dataset/seed/piwigo/manual/image/postinstall/piwigo.sh

80 lines
2.9 KiB
Bash
Raw Permalink Normal View History

2022-04-28 21:48:16 +02:00
set -e
2022-12-25 17:08:52 +01:00
gdthumb=7848
rv_tscroller=8014
openidconnect=7744
community=8160 # FIXME translation already needed?
embedded_videos=7924
bootstrap_darkroom=8261
2022-04-28 21:48:16 +02:00
ORIPWD=$PWD
2022-12-25 17:08:52 +01:00
mkdir -p "$IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/usr/local/share"
cd "$IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/usr/local/share"
2022-04-08 18:53:57 +02:00
app=$(wget https://api.github.com/repos/Piwigo/Piwigo/releases/latest -q -O - | jq -r '.tag_name')
wget -q "https://github.com/Piwigo/Piwigo/archive/refs/tags/$app.tar.gz"
tar xf *tar.gz
rm -f *tar.gz
mv Piwigo-* piwigo
chown -R root: piwigo
2022-04-28 21:48:16 +02:00
rm -rf piwigo/doc piwigo/README.md # piwigo/install.php
ln -s /etc/piwigo/config.inc.php piwigo/local/config/config.inc.php
ln -s /etc/piwigo/database.inc.php piwigo/local/config/database.inc.php
ln -s /srv/piwigo/data piwigo/_data
ln -s /srv/piwigo/upload piwigo/upload
ln -s /srv/piwigo/logs piwigo/logs
2022-10-01 19:22:47 +02:00
cp $IMAGE_DIR_RECIPIENT_IMAGE/postinstall/osmmap.php piwigo/
2022-04-28 21:48:16 +02:00
chmod 644 piwigo/osmmap.php
2022-10-01 19:22:47 +02:00
patch -p0 < $IMAGE_DIR_RECIPIENT_IMAGE/postinstall/piwigo.patch
cp $IMAGE_DIR_RECIPIENT_IMAGE/postinstall/piwigo_cli.php piwigo/
2022-04-28 21:48:16 +02:00
# Plugins
cd piwigo/plugins
2022-12-25 17:08:52 +01:00
wget https://piwigo.org/ext/download.php?rid=$gdthumb -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
#
2022-12-25 17:08:52 +01:00
wget https://piwigo.org/ext/download.php?rid=$rv_tscroller -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
#
app=$(wget https://api.github.com/repos/Piwigo/piwigo-openstreetmap/releases/latest -q -O - | jq -r '.tag_name')
wget -q "https://github.com/Piwigo/piwigo-openstreetmap/archive/refs/tags/$app.tar.gz"
tar xf *tar.gz
rm -f *tar.gz
mv piwigo-openstreetmap-* piwigo-openstreetmap
#
2022-12-25 17:08:52 +01:00
wget https://piwigo.org/ext/download.php?rid=$openidconnect -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
# community
2022-12-25 17:08:52 +01:00
wget https://piwigo.org/ext/download.php?rid=$community -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
echo """<?php
2022-10-01 19:22:47 +02:00
\$lang['Edit Photos'] = 'Editer les photos';
\$lang['Edit your photos'] = 'Editer vos photos';
\$lang['Photos posted by %s'] = 'Photos postées par %s';
\$lang['Photos posted by %s in album %s'] = 'Photos postées par %s dans l\'album %s';
\$lang['Select at least one tag'] = 'Sélectionner au moins un tag';
\$lang['Select at least one photo'] = 'Sélectionner au moins une photo';
\$lang['No photo can be deleted'] = 'Aucune photo ne peut être supprimée';
\$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
\$lang['No photo selected, no action possible.'] = 'Aucune photo sélectionnée, aucune action possible.';
2022-04-28 21:48:16 +02:00
?>
""" >> community/language/fr_FR/plugin.lang.php
# embedded
2022-12-25 17:08:52 +01:00
wget https://fr.piwigo.org/ext/download.php?rid=$embedded_videos -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
# user delete photo
#wget https://fr.piwigo.org/ext/download.php?rid=7974 -O plugin.zip
#unzip plugin.zip
#rm -f plugin.zip
# Theme
cd ../themes/
2022-12-25 17:08:52 +01:00
wget https://piwigo.org/ext/download.php?rid=$bootstrap_darkroom -O plugin.zip
2022-04-28 21:48:16 +02:00
unzip plugin.zip
rm -f plugin.zip
ln -s /srv/piwigo/bootstrap_darkroom ../local/bootstrap_darkroom
#
cd $ORIPWD