#!/bin/sh UUID="81CC-A462" if test ! -h "/dev/disk/by-uuid/$UUID"; then notify-send "ipod-sync" "can't find disk with uuid $UUID" exit 1 fi read -r -d '' commands << EOF echo "mounting..." sudo mount "/dev/disk/by-uuid/$UUID" /mnt/ipod -o uid=loek,gid=users echo "mounted" echo "copying music..." musicopy echo "pushing scrobbler.log to last.fm..." pyapplier -y -f /mnt/ipod/.scrobbler.log echo "unmounting..." sudo umount /mnt/ipod echo "done! exiting..." sleep 1 EOF st -T "[floating]" -g "100x15--154-140" -e sh -c "$commands"