From 54fb0f792970bac4fade63b4a6ac5381244ae652 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Sun, 24 Mar 2024 23:25:05 +0100 Subject: [PATCH] =?UTF-8?q?qemush=20:=20POSIXage=20(suppression=20des=20mo?= =?UTF-8?q?ts=20cl=C3=A9=20local)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/qemush | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/qemush b/bin/qemush index e0a8b1d..4e972f2 100755 --- a/bin/qemush +++ b/bin/qemush @@ -21,7 +21,6 @@ perror() { # Function to show the usage public_help() { - local name name=$(basename "$0") exec cat << EOF @@ -111,7 +110,7 @@ public_diskls() { # Edit a virtual machine entrypoint with a text editor public_edit() { - local file="launchers/${1}" + file="launchers/${1}" # I don't even know why shellcheck gives me this warning # shellcheck disable=2209 [ -z "$EDITOR" ] && EDITOR=vi @@ -149,16 +148,15 @@ public_add() { trap return EXIT set -e - local name if [ -n "$2" ]; then name="$2" else name=$(basename "$1") fi - name="${HOME}/launchers/${name}" + destination="${HOME}/launchers/${destination}" - cp -vi -- "$1" "$name" - chmod 740 "$name" + cp -vi -- "$1" "$destination" + chmod 0740 -- "$destination" set +e trap - EXIT