1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

On supprime l'argument dans la fonction SETUP_SOURCE

This commit is contained in:
magikcypress 2017-03-26 00:58:09 +01:00
parent 33bf560be5
commit e2bc63b1b5
3 changed files with 9 additions and 9 deletions

View file

@ -79,15 +79,15 @@ GENERATE_DB () { # Create a database and a dedicated user in the name of the app
}
SETUP_SOURCE () { # Download source, decompress and copu into $final_path
# $1 = Nom de l'archive téléchargée.
sudo wget -nv -i ../sources/source_url -O $1
src=$(cat ../sources/source_md5 | awk -F' ' {'print $2'})
sudo wget -nv -i ../sources/source_url -O $src
# Checks the checksum of the downloaded source.
# md5sum -c ../sources/source_md5 --status
# md5sum -c ../sources/source_md5 --status || ynh_die "Corrupt source"
# Decompress source
if [ "$(echo ${1##*.})" == "tgz" ]; then
tar -x -f $1
elif [ "$(echo ${1##*.})" == "zip" ]; then
unzip -q $1
if [ "$(echo ${src##*.})" == "tgz" ]; then
tar -x -f $src
elif [ "$(echo ${src##*.})" == "zip" ]; then
unzip -q $src
else
false # Unsupported archive format.
fi

View file

@ -47,7 +47,7 @@ GENERATE_DB $app # Create a database and a dedicated user in the app name
sudo mkdir "$final_path"
ynh_app_setting_set $app final_path $final_path
SETUP_SOURCE "spip-3.1.zip"
SETUP_SOURCE
# Set permissions spip directory
sudo chown -R www-data: $final_path

View file

@ -28,7 +28,7 @@ root_pwd=$(sudo cat /etc/yunohost/mysql)
final_path=/var/www/$app
SETUP_SOURCE "spip-3.1.zip"
SETUP_SOURCE
db_name=$app