Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (29 sloc) 880 Bytes
source ~/.ipod
cmd=$1
if [ $cmd == "init" ]; then
sudo gnupod_INIT.pl -m $IPOD_MOUNTPOINT
elif [ $cmd == "add" ]; then
sudo gnupod_addsong.pl -m $IPOD_MOUNTPOINT "$2"
elif [ $cmd == "all" ]; then
find "$2" -print0 | while read -d $'\0' file
do
echo "Adding $file"
sudo gnupod_addsong.pl -m $IPOD_MOUNTPOINT "$file"
done
elif [ $cmd == "decode" ]; then
sudo gnupod_addsong.pl -m $IPOD_MOUNTPOINT $2 --decode=mp3
elif [ $cmd == "search" ]; then
sudo gnupod_search.pl -m $IPOD_MOUNTPOINT -a "$2"
elif [ $cmd == "rm" ]; then
sudo gnupod_search.pl -m $IPOD_MOUNTPOINT -a "$2" -d
elif [ $cmd == "kill" ]; then
sudo mktunes.pl -m $IPOD_MOUNTPOINT
sudo umount $IPOD_MOUNTPOINT
sudo rmmod sbp2
else
mpoint="/media/$2"
export IPOD_MOUNTPOINT="$mpoint"
echo "$mpoint"
sudo mount /dev/sd$1 $mpoint
echo "IPOD_MOUNTPOINT=\"$mpoint\"" > ~/.ipod
fi
Something went wrong with that request. Please try again.