aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-05 07:37:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-05 07:37:51 -0300
commita2ee5a327f96cfbd91ca48c360a2b81a7e0bf282 (patch)
tree0ce395b881277300912acf3f585d5dbedc46cf76
parenta4333e7689fe8980ac5ca161c4c29dd0c1a81ecf (diff)
downloadplaylister-a2ee5a327f96cfbd91ca48c360a2b81a7e0bf282.tar.gz
playlister-a2ee5a327f96cfbd91ca48c360a2b81a7e0bf282.tar.bz2
Download playlist only for playlist-wget
-rwxr-xr-xplaylist-wget8
1 files changed, 4 insertions, 4 deletions
diff --git a/playlist-wget b/playlist-wget
index 0f33887..247d450 100755
--- a/playlist-wget
+++ b/playlist-wget
@@ -24,11 +24,11 @@ PLAYLIST_BASE="$(dirname $(dirname $PLAYLIST))"
# We use sed to replace new lines by the null character so xargs can detect each file correctly
#curl -s $PLAYLIST | sed -e "s|^|\"$PLAYLIST_BASE/|" -e 's|$|"|' -e 's|\n|\x0|' | xargs wget -c
-# Download the playlist
-wget -c $PLAYLIST
-
-# Process each file
+# Dispatch
if [ "$BASENAME" == "playlist-wget" ]; then
+ # Download the playlist
+ wget -c $PLAYLIST
+
cat `basename $PLAYLIST` | while read file; do
dirname="`dirname "$file"`"