qemush : POSIXage (suppression des mots clé local)
This commit is contained in:
parent
69e5bf4a4e
commit
54fb0f7929
1 changed files with 4 additions and 6 deletions
10
bin/qemush
10
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
|
||||
|
|
Loading…
Reference in a new issue