Remaniement : réécriture du script pour monter mon téléphone

This commit is contained in:
Hippolyte Chauvin 2023-05-20 12:47:00 +02:00
parent 750b1aa541
commit 2d826f60bc

View file

@ -1,24 +1,17 @@
#!/bin/bash #!/bin/sh
# Variable # Variable
dest=/mnt/ahurac/phone if [ -n "$1" ]; then
dest="$1"
# Commands building shift
# Create destination else
create_destination=( dest=/mnt/ahurac/phone
mkdir fi
-p
"$dest"
)
# Mount phone
mount_phone=(
aft-mtp-mount
"$dest"
)
# Execution # Execution
set -xe set -xe
"${create_destination[@]}" mkdir -p "$dest"
"${mount_phone[@]}" aft-mtp-mount "$dest"
set +x
echo "Mounted on: \"${dest}\""