22 lines
578 B
Bash
Executable File
22 lines
578 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eou pipefail
|
|
|
|
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
|
|
|
|
echo "syncing music..."
|
|
sudo rsync --info=progress2 -W -r --delete ~/Music/* /run/media/default/MUSIC/
|
|
sudo sync /run/media/default/MUSIC/
|
|
|
|
cd /run/media/default/MUSIC
|
|
sudo generate-playlists
|
|
cd /home/default
|
|
|
|
echo "unmounting /run/media/default/MUSIC"
|
|
sudo umount /dev/disk/by-uuid/E6F8-C183
|
|
sudo rmdir /run/media/default/MUSIC
|