Browse Source

install_easy : fix exit when su/sudo notfound

pull/33/head
bolvan 6 years ago
parent
commit
f5eaf13cbb
  1. 16
      install_easy.sh

16
install_easy.sh

@ -24,14 +24,6 @@ whichq()
which $1 2>/dev/null
}
[ $(id -u) -ne "0" ] && {
echo root is required
exists sudo && exec sudo $0
exists su && exec su -c $0
echo su or sudo not found
exit 2
}
exitp()
{
echo
@ -40,6 +32,14 @@ exitp()
exit $1
}
[ $(id -u) -ne "0" ] && {
echo root is required
exists sudo && exec sudo $0
exists su && exec su -c $0
echo su or sudo not found
exitp 2
}
get_dir_inode()
{
ls -id "$1" | cut -f1 -d ' '

Loading…
Cancel
Save