1
0
Fork 0
forked from ahurac/dotfiles

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
dest=/mnt/ahurac/phone
# Commands building
# Create destination
create_destination=(
mkdir
-p
"$dest"
)
# Mount phone
mount_phone=(
aft-mtp-mount
"$dest"
)
if [ -n "$1" ]; then
dest="$1"
shift
else
dest=/mnt/ahurac/phone
fi
# Execution
set -xe
"${create_destination[@]}"
"${mount_phone[@]}"
mkdir -p "$dest"
aft-mtp-mount "$dest"
set +x
echo "Mounted on: \"${dest}\""