DEST="`cd $DEST && pwd`"
elif [ "$DEST" == "adb" ]; then
APP="adb"
- action="adb"
+ action="push"
DEST="/storage/emulated/0/Music"
else
DEST="--to $DEST"
$APP $action "$file" "$DEST$prefix"
elif [ "$action" == "get" ]; then
$APP $action "$file"
- elif [ "$action" == "adb" ]; then
+ elif [ "$APP" == "adb" ]; then
prefix="/$(dirname "$file")"
- $APP shell mkdir -p "$DEST$prefix" &> /dev/null
- $APP push "$file" "$DEST$prefix"
+ $APP shell mkdir -p "$DEST$prefix" &> /dev/null
+ $APP $action "$file" "$DEST$prefix"
else
$APP $action "$file" $DEST
fi
done
+
+# Copy the playlist to the destination
+if [ "$action" != "get" ]; then
+ $APP $action "$PLAYLISTS/$PLAYLIST.m3u" $DEST/$PLAYLIST.m3u
+fi