2024-05-23 11:30:18 -04:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
set -eou pipefail
|
|
|
|
|
2024-08-16 20:20:17 -04:00
|
|
|
sudo mkdir -p /run/media/default
|
|
|
|
|
|
|
|
echo "mounting /run/media/default/MUSIC"
|
|
|
|
sudo fsck -fy /dev/disk/by-uuid/E6F8-C183 || true
|
|
|
|
sudo mkdir /run/media/default/MUSIC
|
|
|
|
sudo mount -U E6F8-C183 /run/media/default/MUSIC
|
2024-05-23 11:30:18 -04:00
|
|
|
|
|
|
|
echo "syncing music..."
|
|
|
|
sudo rsync --info=progress2 -W -r --delete ~/Music/* /run/media/default/MUSIC/
|
2024-08-16 20:20:17 -04:00
|
|
|
sudo sync /run/media/default/MUSIC/
|
2024-05-23 11:30:18 -04:00
|
|
|
|
|
|
|
cd /run/media/default/MUSIC
|
|
|
|
sudo generate-playlists
|
|
|
|
cd /home/default
|
|
|
|
|
|
|
|
echo "unmounting /run/media/default/MUSIC"
|
2024-09-03 20:34:45 -04:00
|
|
|
sudo umount /dev/disk/by-uuid/E6F8-C183
|
2024-05-23 11:30:18 -04:00
|
|
|
sudo rmdir /run/media/default/MUSIC
|