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

Last master version of Bozon or not #8

This commit is contained in:
ewilly 2016-04-17 19:06:54 +02:00
parent e728a5c19c
commit af1b1a30e8
3 changed files with 19 additions and 2 deletions

1
BoZoN-stable Normal file
View file

@ -0,0 +1 @@
091b4f66f213385a1afc2d88159fbb3deb466c8f

View file

@ -62,6 +62,15 @@
"fr": "Définissez la taille limite de téléchargement" "fr": "Définissez la taille limite de téléchargement"
}, },
"default": "2G" "default": "2G"
},
{
"name": "version",
"ask": {
"en": "Select the version of BoZoN you want to install",
"fr": "Sélectionnez la version de BoZoN que vous souhaitez installer"
},
"choices": ["Stable","Latest"],
"default": "Stable"
} }
] ]
} }

View file

@ -9,6 +9,7 @@ path=$2
is_public=$3 is_public=$3
default_lang=$4 default_lang=$4
filesize=$5 filesize=$5
version=$6
# definie useful vars # definie useful vars
app=bozon app=bozon
@ -31,10 +32,16 @@ sudo yunohost app setting $app domain -v "$domain"
sudo yunohost app setting $app path -v "$path" sudo yunohost app setting $app path -v "$path"
# download bozon # download bozon
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip -O $parent_path/master.zip if [ "$version" = "Latest" ];
then
sudo wget https://github.com/broncowdd/BoZoN/archive/master.zip -O $parent_path/master.zip
else
stable=$(curl https://github.com/ewilly/bozon_ynh/blob/master/BoZoN-stable)
sudo wget https://github.com/broncowdd/BoZoN/archive/$stable.zip -O $parent_path/master.zip
fi
sudo unzip $parent_path/master.zip -d $parent_path/ sudo unzip $parent_path/master.zip -d $parent_path/
sudo rm $parent_path/master.zip sudo rm $parent_path/master.zip
sudo mv $parent_path/BoZoN-master $parent_path/$app sudo mv $parent_path/BoZoN-* $parent_path/$app
# add required packages # add required packages
sudo apt-get install php5-curl php5-gd sudo apt-get install php5-curl php5-gd