qemush : ne pas cd avant l'exécution du script
This commit is contained in:
parent
c3f9ea310f
commit
6a7c58fc05
1 changed files with 2 additions and 4 deletions
|
@ -7,15 +7,13 @@ exec_as() {
|
|||
|
||||
if [ "$(whoami)" != "$user" ]; then
|
||||
exec sudo -u "$user" "$0" "$@"
|
||||
else
|
||||
cd || exit
|
||||
fi
|
||||
}
|
||||
|
||||
exec_as qemu "$@"
|
||||
|
||||
bin="${HOME}/bin"
|
||||
images=images
|
||||
images="${HOME}/images"
|
||||
PATH="${bin}:${PATH}"
|
||||
EDITOR="${EDITOR:-nvim}"
|
||||
alias ls='ls --color=auto'
|
||||
|
@ -106,6 +104,7 @@ public_rm() {
|
|||
}
|
||||
|
||||
public_shell() {
|
||||
cd || return
|
||||
exec bash -i
|
||||
}
|
||||
|
||||
|
@ -116,7 +115,6 @@ public_cat() {
|
|||
public_add() {
|
||||
trap return EXIT
|
||||
set -e
|
||||
cd -
|
||||
local name="${2:-$(basename "$1")}"
|
||||
cp -v -i -- "$1" "${bin}/${2}"
|
||||
chmod 740 "${bin}/${name}"
|
||||
|
|
Loading…
Reference in a new issue