fix update script for archlinux
This commit is contained in:
parent
720cfd75b2
commit
9d912f5fee
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue