diff options
l--------- | playlist-drop | 1 | ||||
-rwxr-xr-x | playlist-get | 8 |
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 |