execline-ptrc-extras/elevate

8 lines
164 B
Text
Executable file

#!/bin/execlineb
backtick -E uid { id -u }
tdefine lift "doas" "sudo" { iscmd doas }
tdefine sucmd "$lift" "exec" { s6-test $uid != 0 }
elgetpositionals
$sucmd
$@