From 8d01c333ed62f2a2437105c936777c71c913c372 Mon Sep 17 00:00:00 2001 From: anntnzrb Date: Fri, 6 Nov 2020 10:52:03 -0500 Subject: [PATCH] Added corresponding return statements codes --- larbs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/larbs.sh b/larbs.sh index 431da4b..9bc137d 100644 --- a/larbs.sh +++ b/larbs.sh @@ -82,7 +82,7 @@ manualinstall() { # Installs $1 manually if not installed. Used only for AUR hel sudo -u "$name" tar -xvf "$1".tar.gz >/dev/null 2>&1 && cd "$1" && sudo -u "$name" makepkg --noconfirm -si >/dev/null 2>&1 - cd /tmp || return) ;} + cd /tmp || return 1) ;} maininstall() { # Installs all needed programs from main repo. dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total). $1 $2" 5 70 @@ -93,15 +93,15 @@ gitmakeinstall() { progname="$(basename "$1" .git)" dir="$repodir/$progname" dialog --title "LARBS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70 - sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return ; sudo -u "$name" git pull --force origin master;} + sudo -u "$name" git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return 1 ; sudo -u "$name" git pull --force origin master;} cd "$dir" || exit 1 make >/dev/null 2>&1 make install >/dev/null 2>&1 - cd /tmp || return ;} + cd /tmp || return 1 ;} aurinstall() { \ dialog --title "LARBS Installation" --infobox "Installing \`$1\` ($n of $total) from the AUR. $1 $2" 5 70 - echo "$aurinstalled" | grep -q "^$1$" && return + echo "$aurinstalled" | grep -q "^$1$" && return 1 sudo -u "$name" $aurhelper -S --noconfirm "$1" >/dev/null 2>&1 }