diff --git a/BoZoN-stable b/BoZoN-stable new file mode 100644 index 0000000..7bc11a8 --- /dev/null +++ b/BoZoN-stable @@ -0,0 +1 @@ +091b4f66f213385a1afc2d88159fbb3deb466c8f diff --git a/manifest.json b/manifest.json index b92ad6f..c86f9da 100644 --- a/manifest.json +++ b/manifest.json @@ -62,6 +62,15 @@ "fr": "Définissez la taille limite de téléchargement" }, "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" } ] } diff --git a/scripts/install b/scripts/install index ebd4076..11d4e01 100644 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,7 @@ path=$2 is_public=$3 default_lang=$4 filesize=$5 +version=$6 # definie useful vars app=bozon @@ -31,10 +32,16 @@ sudo yunohost app setting $app domain -v "$domain" sudo yunohost app setting $app path -v "$path" # 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 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 sudo apt-get install php5-curl php5-gd