qemush : fonction add, déplacement du trap après le bloc conditionnel

This commit is contained in:
Ahurac 2024-03-24 23:28:52 +01:00
parent 29fc93c188
commit c86c7a2e01

View file

@ -151,8 +151,6 @@ public_cat() {
# Copy a file in entrypoints folder
public_add() {
trap return EXIT
set -e
if [ -n "$2" ]; then
name="$2"
@ -161,6 +159,9 @@ public_add() {
fi
destination="${HOME}/launchers/${destination}"
trap return EXIT
set -e
cp -vi -- "$1" "$destination"
chmod 0740 -- "$destination"