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

73 lines
2.7 KiB
Bash
Raw Normal View History

2022-04-28 21:48:16 +02:00
set -e
ORIPWD=$PWD
2022-04-08 18:53:57 +02:00
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
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-05-04 10:29:03 +02:00
cp $OLDPWD/piwigo/manual/postinstall/osmmap.php piwigo/
2022-04-28 21:48:16 +02:00
chmod 644 piwigo/osmmap.php
2022-05-04 10:29:03 +02:00
patch -p0 < $OLDPWD/piwigo/manual/postinstall/piwigo.patch
cp $OLDPWD/piwigo/manual/postinstall/piwigo_cli.php piwigo/
2022-04-28 21:48:16 +02:00
# 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