Add sync_music.sh

This commit is contained in:
2024-06-29 20:05:27 +01:00
parent 2d7d16949a
commit 010676ebec

14
sync_music.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
# Script to sync my Android phone's music library to the contents of my ~/media/music/ directory
mountpoint="$HOME/mnt"
source="$HOME/media/music"
destination="$mountpoint/Internal shared storage/Music"
mkdir "$mountpoint"
aft-mtp-mount "$mountpoint"
rsync --archive --delete "$source" "$destination"
sync
fusermount -u "$mountpoint"