install_easy : fix exit when su/sudo notfound

This commit is contained in:
bolvan 2019-05-08 09:35:03 +03:00
parent a20e7f2353
commit f5eaf13cbb

View File

@ -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 ' '