dataset/seed/applicationservice/2022.03.08/piwigo/manual/image/postinstall/piwigo.sh
Emmanuel Garette da3e4d487d add piwigo
2022-04-28 21:48:16 +02:00

72 lines
2.7 KiB
Bash

set -e
ORIPWD=$PWD
mkdir -p "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/local/share"
cd "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/local/share"
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
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
cp $OLDPWD/piwigo/postinstall/osmmap.php piwigo/
chmod 644 piwigo/osmmap.php
patch -p0 < $OLDPWD/piwigo/postinstall/piwigo.patch
cp $OLDPWD/piwigo/postinstall/piwigo_cli.php piwigo/
# Plugins
cd piwigo/plugins
wget https://piwigo.org/ext/download.php?rid=7848 -O plugin.zip
unzip plugin.zip
rm -f plugin.zip
#
wget https://piwigo.org/ext/download.php?rid=8014 -O plugin.zip
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
#
wget https://piwigo.org/ext/download.php?rid=7744 -O plugin.zip
unzip plugin.zip
rm -f plugin.zip
# community
wget https://piwigo.org/ext/download.php?rid=8160 -O plugin.zip
unzip plugin.zip
rm -f plugin.zip
echo """<?php
$lang['Edit photos'] = 'Editer les photos';
$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.';
?>
""" >> community/language/fr_FR/plugin.lang.php
# embedded
wget https://fr.piwigo.org/ext/download.php?rid=7924 -O plugin.zip
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/
wget https://piwigo.org/ext/download.php?rid=8163 -O plugin.zip
unzip plugin.zip
rm -f plugin.zip
ln -s /srv/piwigo/bootstrap_darkroom ../local/bootstrap_darkroom
#
cd $ORIPWD