From 2f4149230f14dbee63656c58528c0585e9c1d6a9 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 23 Oct 2016 13:14:44 -0200 Subject: Examples and adb support --- playlist-get | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/playlist-get b/playlist-get index 170f6be..6c4dd51 100755 --- a/playlist-get +++ b/playlist-get @@ -21,6 +21,12 @@ if [ -z "$PLAYLIST" ]; then ls $PLAYLISTS fi + echo "Examples:" + echo "" + echo "$BASENAME ambient adb" + echo "$BASENAME groove /media/usb" + echo "$BASENAME funk remote-repository" + exit 1 elif [ ! -f "$PLAYLISTS/$PLAYLIST.m3u" ]; then echo "No such playlist $PLAYLISTS/$PLAYLIST.m3u" @@ -40,6 +46,10 @@ elif [ "$BASENAME" == "playlist-copy" ]; then # Force absolute path DEST="`cd $DEST && pwd`" + elif [ "$DEST" == "adb" ]; then + APP="adb" + action="adb" + DEST="/storage/emulated/0/Music" else DEST="--to $DEST" action="copy" @@ -59,6 +69,9 @@ cat $PLAYLISTS/$PLAYLIST.m3u | while read file; do $APP $action "$file" "$DEST$prefix" elif [ "$action" == "get" ]; then $APP $action "$file" + elif [ "$action" == "adb" ]; then + prefix="/$(dirname "$file")" + $APP push "$file" "$DEST$prefix" else $APP $action "$file" $DEST fi -- cgit v1.2.3