mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
add caution and depends loops
This commit is contained in:
parent
d5bbfbf45c
commit
42aaf1de6d
1 changed files with 23 additions and 9 deletions
|
@ -31,12 +31,15 @@ fi
|
||||||
echo "======== YunoHost Installation ========"
|
echo "======== YunoHost Installation ========"
|
||||||
echo "======== Check dependences ========"
|
echo "======== Check dependences ========"
|
||||||
|
|
||||||
dpkg -l | grep -q lsb-release
|
apt-get update -qq
|
||||||
if [[ $? -eq 1 ]]
|
for i in lsb-release wget whiptail
|
||||||
then
|
do
|
||||||
apt-get update -qq
|
dpkg -l | grep -q $i
|
||||||
apt-get install lsb-release -y
|
if [[ $? -eq 1 ]]
|
||||||
fi
|
then
|
||||||
|
apt-get install $i -y
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [[ ! -f /etc/yunohost/yunohost.conf ]]
|
if [[ ! -f /etc/yunohost/yunohost.conf ]]
|
||||||
then
|
then
|
||||||
|
@ -108,6 +111,17 @@ then
|
||||||
|
|
||||||
CUSTOMAPT=/etc/apt/sources.list
|
CUSTOMAPT=/etc/apt/sources.list
|
||||||
|
|
||||||
|
if [[ "$(lsb_release -cs)" = "wheezy" ]] || [[ "$(lsb_release -cs)" = "n/a" ]]
|
||||||
|
then
|
||||||
|
whiptail --title "Yunohost Installation" --yesno "Caution : Yunohost v2 is in development.\nDo you want to proceed install of Yunohost?" 8 78
|
||||||
|
YESNO=$?
|
||||||
|
if [[ $YESNO -eq 0 ]]
|
||||||
|
then
|
||||||
|
echo "======== Installation cancelled ========"
|
||||||
|
exit $ERR_CANCEL_INSTALL
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
grep -qri "yunohost" $CUSTOMAPT
|
grep -qri "yunohost" $CUSTOMAPT
|
||||||
if [[ $? -eq 1 ]]
|
if [[ $? -eq 1 ]]
|
||||||
then
|
then
|
||||||
|
@ -116,9 +130,9 @@ then
|
||||||
echo "deb http://repo.yunohost.org/ squeeze main" >> $CUSTOMAPT
|
echo "deb http://repo.yunohost.org/ squeeze main" >> $CUSTOMAPT
|
||||||
echo "deb http://repo.yunohost.org/ apps main" >> $CUSTOMAPT
|
echo "deb http://repo.yunohost.org/ apps main" >> $CUSTOMAPT
|
||||||
;;
|
;;
|
||||||
"wheezy"|"n/a")
|
"wheezy"|"n/a")
|
||||||
echo "deb http://repo.yunohost.org/ megusta main" >> $CUSTOMAPT
|
echo "deb http://repo.yunohost.org/ megusta main" >> $CUSTOMAPT
|
||||||
echo "deb http://repo.yunohost.org/ apps main" >> $CUSTOMAPT
|
echo "deb http://repo.yunohost.org/ apps main" >> $CUSTOMAPT
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue