1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

On supprime l'argument dans la fonction SETUP_SOURCE

This commit is contained in:
magikcypress 2017-03-26 01:02:03 +01:00
parent b6f63ecbc9
commit 0553c945fb
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

@ -43,7 +43,7 @@ ynh_app_setting_set $app multisite $multisite
sudo mkdir "$final_path"
ynh_app_setting_set $app final_path $final_path
SETUP_SOURCE "grav-admin-v1.1.17.zip"
SETUP_SOURCE
# Grav install
sudo $final_path/bin/grav

View file

@ -27,7 +27,7 @@ fi
final_path=/var/www/$app
SETUP_SOURCE "grav-admin-v1.1.17.zip"
SETUP_SOURCE
# Modify Nginx configuration file and copy it to Nginx conf directory
sudo sed -i "s@__PATHTOCHANGE__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf