Fix startup if not in directory.
This commit is contained in:
parent
bd3c482d90
commit
7213b9be35
1 changed files with 15 additions and 1 deletions
16
start
16
start
|
@ -15,9 +15,23 @@ if [[ -z "$DEBUG" ]]; then
|
||||||
DEBUG=
|
DEBUG=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Sudo prompt
|
||||||
|
if [[ -n "$SUDO" ]]; then
|
||||||
|
true
|
||||||
|
elif [[ -t 1 ]]; then
|
||||||
|
SUDO=sudo
|
||||||
|
else
|
||||||
|
export SUDO_ASKPASS=/usr/lib/ssh/ssh-askpass
|
||||||
|
SUDO='sudo --askpass'
|
||||||
|
fi
|
||||||
|
if ! which "$SUDO" >/dev/null 2>&1; then
|
||||||
|
SUDO=sudo
|
||||||
|
fi
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
SUDO=sudo
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
$SUDO true
|
$SUDO true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue