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
|
# Function to show the usage
|
||||||
public_help() {
|
public_help() {
|
||||||
local name
|
|
||||||
name=$(basename "$0")
|
name=$(basename "$0")
|
||||||
|
|
||||||
exec cat << EOF
|
exec cat << EOF
|
||||||
|
@ -111,7 +110,7 @@ public_diskls() {
|
||||||
|
|
||||||
# Edit a virtual machine entrypoint with a text editor
|
# Edit a virtual machine entrypoint with a text editor
|
||||||
public_edit() {
|
public_edit() {
|
||||||
local file="launchers/${1}"
|
file="launchers/${1}"
|
||||||
# I don't even know why shellcheck gives me this warning
|
# I don't even know why shellcheck gives me this warning
|
||||||
# shellcheck disable=2209
|
# shellcheck disable=2209
|
||||||
[ -z "$EDITOR" ] && EDITOR=vi
|
[ -z "$EDITOR" ] && EDITOR=vi
|
||||||
|
@ -149,16 +148,15 @@ public_add() {
|
||||||
trap return EXIT
|
trap return EXIT
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
local name
|
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
name="$2"
|
name="$2"
|
||||||
else
|
else
|
||||||
name=$(basename "$1")
|
name=$(basename "$1")
|
||||||
fi
|
fi
|
||||||
name="${HOME}/launchers/${name}"
|
destination="${HOME}/launchers/${destination}"
|
||||||
|
|
||||||
cp -vi -- "$1" "$name"
|
cp -vi -- "$1" "$destination"
|
||||||
chmod 740 "$name"
|
chmod 0740 -- "$destination"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
|
|
Loading…
Reference in a new issue