qemush : fonction add
, déplacement du trap
après le bloc conditionnel
This commit is contained in:
parent
29fc93c188
commit
c86c7a2e01
1 changed files with 3 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue