Refactor
This commit is contained in:
parent
3eb42130c9
commit
a2450b409c
10
install.sh
10
install.sh
|
@ -11,10 +11,6 @@ formatOptions() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
logStep() {
|
|
||||||
echo ${1} > CocoASAIS.log
|
|
||||||
}
|
|
||||||
|
|
||||||
checkUefi() {
|
checkUefi() {
|
||||||
ls /sys/firmware/efi/efivars > /dev/null 2>&1
|
ls /sys/firmware/efi/efivars > /dev/null 2>&1
|
||||||
if [ $? -ge 1 ]; then
|
if [ $? -ge 1 ]; then
|
||||||
|
@ -26,6 +22,10 @@ updateSystemClock() {
|
||||||
timedatectl set-ntp true
|
timedatectl set-ntp true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logStep() {
|
||||||
|
echo ${1} > CocoASAIS.log
|
||||||
|
}
|
||||||
|
|
||||||
logAndExit() {
|
logAndExit() {
|
||||||
str="${1} Therefore, the installation process will stop, but you can continue where you left off by running:\n\nsh CocoASAIS"
|
str="${1} Therefore, the installation process will stop, but you can continue where you left off by running:\n\nsh CocoASAIS"
|
||||||
newlines=$(printf "$str" | grep -c $'\n')
|
newlines=$(printf "$str" | grep -c $'\n')
|
||||||
|
@ -35,7 +35,7 @@ logAndExit() {
|
||||||
printf "%d", (x == int(x)) ? x : int(x) + 1
|
printf "%d", (x == int(x)) ? x : int(x) + 1
|
||||||
}')
|
}')
|
||||||
whiptail --msgbox "$str" $((5+height)) 60
|
whiptail --msgbox "$str" $((5+height)) 60
|
||||||
echo "${2}" > CocoASAIS.log
|
logStep "${2}"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue