mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
apeinstall/uninstall.sh can use doas (#1062)
This commit is contained in:
parent
492a8f4f53
commit
390335eb45
2 changed files with 12 additions and 2 deletions
|
@ -18,8 +18,13 @@ fi
|
||||||
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
SUDO=
|
SUDO=
|
||||||
else
|
elif command -v sudo >/dev/null 2>&1; then
|
||||||
SUDO=sudo
|
SUDO=sudo
|
||||||
|
elif command -v doas >/dev/null 2>&1; then
|
||||||
|
SUDO=doas
|
||||||
|
else
|
||||||
|
echo "need root or sudo" >&2
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v install >/dev/null 2>&1; then
|
if command -v install >/dev/null 2>&1; then
|
||||||
|
|
|
@ -11,8 +11,13 @@ fi
|
||||||
|
|
||||||
if [ "$UID" = "0" ]; then
|
if [ "$UID" = "0" ]; then
|
||||||
SUDO=
|
SUDO=
|
||||||
else
|
elif command -v sudo >/dev/null 2>&1; then
|
||||||
SUDO=sudo
|
SUDO=sudo
|
||||||
|
elif command -v doas >/dev/null 2>&1; then
|
||||||
|
SUDO=doas
|
||||||
|
else
|
||||||
|
echo "need root or sudo" >&2
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue