diff --git a/scripts/update/arch.sh b/scripts/update/arch.sh index 9bf229f..6546d6e 100755 --- a/scripts/update/arch.sh +++ b/scripts/update/arch.sh @@ -25,6 +25,9 @@ for arg in "$@"; do esac done +# sudo +sudo id -u 2&> /dev/null + printf "${BOLD}${YELLOW}>> starting system update...${DEFAULT}\n" # upgrade installed packages diff --git a/scripts/update/update.sh b/scripts/update/update.sh index d3eeff5..e1b8f58 100755 --- a/scripts/update/update.sh +++ b/scripts/update/update.sh @@ -17,8 +17,11 @@ for arg in "$@"; do done # execute update script -if [ "$(id -u)" -eq 0 ]; then - "$script" $args +#if [ "$distro" == "arch" ]; then +# "$script" $args +if [ "$(id -u)" -eq 0 ] || [ "$distro" == "arch" ]; then +#elif [ "$(id -u)" -eq 0 ]; then + "$script" $args else sudo "$script" $args fi