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
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# sudo
|
||||||
|
sudo id -u 2&> /dev/null
|
||||||
|
|
||||||
printf "${BOLD}${YELLOW}>> starting system update...${DEFAULT}\n"
|
printf "${BOLD}${YELLOW}>> starting system update...${DEFAULT}\n"
|
||||||
|
|
||||||
# upgrade installed packages
|
# upgrade installed packages
|
||||||
|
|
|
@ -17,8 +17,11 @@ for arg in "$@"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# execute update script
|
# execute update script
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
#if [ "$distro" == "arch" ]; then
|
||||||
"$script" $args
|
# "$script" $args
|
||||||
|
if [ "$(id -u)" -eq 0 ] || [ "$distro" == "arch" ]; then
|
||||||
|
#elif [ "$(id -u)" -eq 0 ]; then
|
||||||
|
"$script" $args
|
||||||
else
|
else
|
||||||
sudo "$script" $args
|
sudo "$script" $args
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue