aboutsummaryrefslogtreecommitdiff
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
parent26aa0ec722d7553c5d7f65347b371c8d1bdeea76 (diff)
downloadscripts-e4b12c944f3b3db8a6d706a9c085235edaab18be.tar.gz
scripts-e4b12c944f3b3db8a6d706a9c085235edaab18be.tar.bz2
Adding playlist-drop
l---------playlist-drop1
-rwxr-xr-xplaylist-get8
2 files changed, 8 insertions, 1 deletions
diff --git a/playlist-drop b/playlist-drop
new file mode 120000
index 0000000..a766a62
--- /dev/null
+++ b/playlist-drop
@@ -0,0 +1 @@
+playlist-get \ No newline at end of file
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