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