From 010676ebec48c716bac0b18e5a860024f8964a94 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 29 Jun 2024 20:05:27 +0100 Subject: [PATCH] Add sync_music.sh --- sync_music.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sync_music.sh diff --git a/sync_music.sh b/sync_music.sh new file mode 100644 index 0000000..faedeac --- /dev/null +++ b/sync_music.sh @@ -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"