aboutsummaryrefslogtreecommitdiff
path: root/playlist-get
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-03-14 20:03:44 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-03-14 20:03:44 -0300
commite4b12c944f3b3db8a6d706a9c085235edaab18be (patch)
tree1f9c111638a3d03a8ab500823a7818d73ae42676 /playlist-get
parent26aa0ec722d7553c5d7f65347b371c8d1bdeea76 (diff)
downloadscripts-e4b12c944f3b3db8a6d706a9c085235edaab18be.tar.gz
scripts-e4b12c944f3b3db8a6d706a9c085235edaab18be.tar.bz2
Adding playlist-drop
Diffstat (limited to 'playlist-get')
-rwxr-xr-xplaylist-get8
1 files changed, 7 insertions, 1 deletions
diff --git a/playlist-get b/playlist-get
index 8990933..7a688d9 100755
--- a/playlist-get
+++ b/playlist-get
@@ -25,11 +25,17 @@ elif [ ! -f "$PLAYLISTS/$PLAYLIST.m3u" ]; then
exit 1
fi
+if [ "$BASENAME" == "playlist-drop" ]; then
+ command="drop"
+else
+ command="get"
+fi
+
echo "Getting files from $PLAYLISTS/$PLAYLIST.m3u..."
cat $PLAYLISTS/$PLAYLIST.m3u | while read file; do
dir="$(dirname "$file")"
base="$(basename "$file")"
- ( cd "$MEDIA/$dir" && git annex get "$base" )
+ ( cd "$MEDIA/$dir" && git annex $command "$base" )
done