Update 'install.sh'

This commit is contained in:
2023-05-02 23:39:11 +02:00
parent 82e7ae2db5
commit efb9688a79

View File

@@ -4,18 +4,23 @@ function show_help {
echo "This is the help"
}
while getopts "h?vyi:d" opt; do
while getopts "h?vyi:acrbm:" opt; do
case "$opt" in
h|\?) show_help; exit 0 ;;
v) P_Verbose=1 ;;
d) P_Debug=1 ;;
y) P_Yes=1 ;;
i) P_Install=$OPTARG
h|\?) show_help; exit 0 ;;
v) P_Verbose=1 ;;
d) P_Debug=1 ;;
y) P_Yes=1 ;;
a) P_APT=1 ;;
c) P_CONFIG=1 ;;
r) P_RC=1 ;;
b) P_BINARY=1 ;;
i) P_Install=$OPTARG ;;
m) ARCH=$OPTARG ;;
esac
done
ASK="\e[34m"
INFO="\e[90m\e[1m"
INFO="\e[91m\e[1m"
ADD="\e[32m\e[1m"
ENDCOLOR="\e[0m"
@@ -163,6 +168,7 @@ function install_deb_check {
}
function install_deb {
if [ ! -z "$P_" ]; then return 0; fi
log_info "Downloading $2 to $TMP_PATH ..."
wget -O $TMP_PATH/$1.deb $2 > /dev/null 2>&1
@@ -187,7 +193,11 @@ function install_deb {
}
function init {
log_info "$ARCH"
log_info "Found Architecture: $ARCH"
if ! user_confirm "Is '$ARCH' the correct architecture to download programs?"; then
log_info "Exiting ..."
exit 0
fi
log_info "Running apt update ..."
sudo apt update > /dev/null 2>&1
mkdir -p $TMP_PATH/