Compare commits
2 commits
21643ed7f8
...
1d3d68926b
Author | SHA1 | Date | |
---|---|---|---|
|
1d3d68926b | ||
|
651f52d7a1 |
1 changed files with 14 additions and 5 deletions
17
bin/qemush
17
bin/qemush
|
@ -1,15 +1,24 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$(whoami)" != root ]; then
|
exec_as() {
|
||||||
exec sudo -u qemu "$0" "$@"
|
local user
|
||||||
else
|
user="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [ "$(whoami)" != "$user" ]; then
|
||||||
|
exec sudo -u "$user" "$0" "$@"
|
||||||
|
else
|
||||||
cd || exit
|
cd || exit
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
exec_as qemu "$@"
|
||||||
|
|
||||||
bin=bin
|
bin=bin
|
||||||
images=images
|
images=images
|
||||||
|
|
||||||
PATH="./${bin}:${PATH}"
|
PATH="./${bin}:${PATH}"
|
||||||
|
EDITOR="${EDITOR:-nvim}"
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
shopt -s expand_aliases
|
shopt -s expand_aliases
|
||||||
|
|
Loading…
Reference in a new issue