mirror of
https://github.com/YunoHost/install_script.git
synced 2024-09-03 20:06:25 +02:00
add force argument
This commit is contained in:
parent
18a7817e22
commit
d6761875b4
1 changed files with 15 additions and 8 deletions
|
@ -181,6 +181,7 @@ Are you sure you want to proceed with the installation of Yunohost?
|
||||||
setup_package_source() {
|
setup_package_source() {
|
||||||
local CUSTOMAPT=/etc/apt/sources.list.d/yunohost.list
|
local CUSTOMAPT=/etc/apt/sources.list.d/yunohost.list
|
||||||
|
|
||||||
|
if [ "${FORCE}" == 0 ]; then
|
||||||
# Check current system version and dependencies
|
# Check current system version and dependencies
|
||||||
if [[ $(lsb_release -c | awk '{print $2}') != jessie ]]; then
|
if [[ $(lsb_release -c | awk '{print $2}') != jessie ]]; then
|
||||||
echo "Current $DISTRIB only works on Debian Jessie for the moment."
|
echo "Current $DISTRIB only works on Debian Jessie for the moment."
|
||||||
|
@ -189,6 +190,7 @@ setup_package_source() {
|
||||||
echo "Current $DISTRIB only works with systemd for the moment."
|
echo "Current $DISTRIB only works with systemd for the moment."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Debian repository
|
# Debian repository
|
||||||
local CUSTOMDEB="deb http://repo.yunohost.org/debian/ jessie stable"
|
local CUSTOMDEB="deb http://repo.yunohost.org/debian/ jessie stable"
|
||||||
|
@ -419,7 +421,8 @@ set -u
|
||||||
AUTOMODE=0
|
AUTOMODE=0
|
||||||
DISTRIB=stable
|
DISTRIB=stable
|
||||||
BUILD_IMAGE=0
|
BUILD_IMAGE=0
|
||||||
while getopts ":aid:h" option; do
|
FORCE=0
|
||||||
|
while getopts ":aifd:h" option; do
|
||||||
case $option in
|
case $option in
|
||||||
a)
|
a)
|
||||||
AUTOMODE=1
|
AUTOMODE=1
|
||||||
|
@ -432,6 +435,10 @@ while getopts ":aid:h" option; do
|
||||||
# This hidden option will allow to build generic image for Rpi/Olimex
|
# This hidden option will allow to build generic image for Rpi/Olimex
|
||||||
BUILD_IMAGE=1
|
BUILD_IMAGE=1
|
||||||
;;
|
;;
|
||||||
|
f)
|
||||||
|
# Force installation (aka I know that I do)
|
||||||
|
FORCE=1
|
||||||
|
;;
|
||||||
h)
|
h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue