From e4b12c944f3b3db8a6d706a9c085235edaab18be Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 14 Mar 2013 20:03:44 -0300 Subject: Adding playlist-drop --- playlist-drop | 1 + playlist-get | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 120000 playlist-drop 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 -- cgit v1.2.3