+30
-8
@@ -23,7 +23,7 @@ Aidé par Claude AI
|
|||||||
|
|
||||||
## Prérequis
|
## Prérequis
|
||||||
|
|
||||||
- Testé avec Roundcube **1.6.x** **1.7.x**
|
- Testé avec Roundcube **1.6.0** jusqu'à **1.7.0**
|
||||||
- Un autre skin **(ex: elastic)** présent dans `/var/www/html/skins/elastic/` (utilisé comme base)
|
- Un autre skin **(ex: elastic)** présent dans `/var/www/html/skins/elastic/` (utilisé comme base)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -87,26 +87,48 @@ docker rm -f tmp-roundcube
|
|||||||
|
|
||||||
ou
|
ou
|
||||||
|
|
||||||
#### 2.1 Directement depuis les sources de roundcubemail (exemple pour va version avec la version 1.7.0)
|
#### 2.1 Directement depuis les sources de roundcubemail (exemple pour la version 1.7.0)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
RC_VERSION=1.7.1
|
||||||
curl --location https://github.com/roundcube/roundcubemail/releases/download/1.7.0/roundcubemail-1.7.0-complete.tar.gz \
|
curl --location https://github.com/roundcube/roundcubemail/releases/download/${RC_VERSION}/roundcubemail-${RC_VERSION}-complete.tar.gz \
|
||||||
--output roundcubemail.tar.gz && \
|
--output roundcubemail.tar.gz && \
|
||||||
tar -zxvf roundcubemail.tar.gz --wildcards --strip-components=1 -C . \
|
tar -zxvf roundcubemail.tar.gz --wildcards --strip-components=1 -C . \
|
||||||
roundcubemail-1.7.0/skins/elastic roundcubemail-1.7.0/plugins/*/skins/elastic
|
roundcubemail-${RC_VERSION}/skins/elastic roundcubemail-${RC_VERSION}/plugins/*/skins/elastic
|
||||||
rm roundcubemail.tar.gz
|
rm roundcubemail.tar.gz
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Puis télécharger la release du thême depuis le dépôt
|
### 3. Puis télécharger la dernière release du thême depuis le dépôt
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
||||||
curl https://git.celjim.fr/public/roundcube-theme-skynet/releases/download/v1/roundcube-theme-skynet-v1.zip \
|
# Compare semver: returns 0 if $1 >= $2
|
||||||
|
version_gte() {
|
||||||
|
[ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Récupère l'URL du dernier asset zip via l'API Gitea
|
||||||
|
LATEST_ZIP=$(curl -s "https://git.celjim.fr/api/v1/repos/public/roundcube-theme-skynet/releases/latest" \
|
||||||
|
| grep -o '"browser_download_url":"[^"]*\.zip"' \
|
||||||
|
| head -n1 \
|
||||||
|
| cut -d'"' -f4)
|
||||||
|
|
||||||
|
curl "${LATEST_ZIP}" \
|
||||||
--output theme-skynet.zip && \
|
--output theme-skynet.zip && \
|
||||||
7z x theme-skynet.zip && \
|
7z x theme-skynet.zip && \
|
||||||
mv -f login.html skins/elastic/templates && \
|
|
||||||
|
if version_gte "$RC_VERSION" "1.7.1"; then
|
||||||
|
sed -e 's|\.\/skins\/skynet\/styles\/styles-skynet\.min\.css|static.php/skins/skynet/styles/styles-skynet.min.css|g' \
|
||||||
|
-e 's|\.\/skins\/skynet\/script-skynet\.min\.js|static.php/skins/skynet/script-skynet.min.js|g' \
|
||||||
|
login.html > skins/elastic/templates/login.html && \
|
||||||
|
rm -f login.html
|
||||||
|
echo fait
|
||||||
|
else
|
||||||
|
mv -f login.html skins/elastic/templates/login.html
|
||||||
|
echo pas fait
|
||||||
|
fi && \
|
||||||
|
|
||||||
mv -f script-skynet.min.js skins/elastic/ && \
|
mv -f script-skynet.min.js skins/elastic/ && \
|
||||||
mv -f styles-skynet.min.css skins/elastic/styles && \
|
mv -f styles-skynet.min.css skins/elastic/styles && \
|
||||||
mv skins/elastic skins/skynet && \
|
mv skins/elastic skins/skynet && \
|
||||||
|
|||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur