From 6a7c58fc05b6080dfc9858e16963a80d8fd756b1 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Tue, 5 Dec 2023 22:56:54 +0100 Subject: [PATCH] =?UTF-8?q?qemush=20:=20ne=20pas=20cd=20avant=20l'ex=C3=A9?= =?UTF-8?q?cution=20du=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/qemush | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/qemush b/bin/qemush index 7dca2db..bcedfc3 100755 --- a/bin/qemush +++ b/bin/qemush @@ -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}"