File: asroot

package info (click to toggle)
bpfilter 0.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,076 kB
  • sloc: ansic: 30,397; sh: 1,383; cpp: 959; python: 495; yacc: 385; lex: 194; makefile: 9
file content (12 lines) | stat: -rwxr-xr-x 201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env sh

# Run a command as root: if the current user is root, run the command directly,
# otherwise prefix it with sudo.

SUDO=''
if [ "$(id -u)" -ne 0 ]
then
    SUDO='sudo'
fi

$SUDO "$@"