aboutsummaryrefslogtreecommitdiff
path: root/playlist-orphans
diff options
context:
space:
mode:
Diffstat (limited to 'playlist-orphans')
-rwxr-xr-xplaylist-orphans16
1 files changed, 9 insertions, 7 deletions
diff --git a/playlist-orphans b/playlist-orphans
index c66bd93..cb103d2 100755
--- a/playlist-orphans
+++ b/playlist-orphans
@@ -34,7 +34,7 @@ function playlist_orphan {
function playlist_orphans {
local cwd="`pwd`"
- cd $MEDIA
+ #cd $MEDIA
if [ ! -z "$FILE" ]; then
playlist_orphan $FILE
@@ -46,24 +46,26 @@ function playlist_orphans {
done
fi
- cd $cwd
+ #cd $cwd
}
# Basic syntax check
if [ "$ITEM" == "--help" ]; then
echo "Usage: $BASENAME [file|folder]"
+ echo ""
+ echo "Example: $basename /path/to/some/media/files/"
exit 1
fi
# Determine items
if [ ! -z "$ITEM" ]; then
- if [ -d "$MEDIA/$ITEM" ]; then
- FOLDER="$MEDIA/$ITEM"
- elif [ -e "$MEDIA/$ITEM" ] || [ -L "$MEDIA/$ITEM" ]; then
- FILE="$MEDIA/$ITEM"
+ if [ -d "$ITEM" ]; then
+ FOLDER="$ITEM"
+ elif [ -e "$ITEM" ] || [ -L "$ITEM" ]; then
+ FILE="$ITEM"
else
- echo "$BASENAME: error: item not found: $MEDIA/$ITEM"
+ echo "$BASENAME: error: item not found: $ITEM"
exit 1
fi
else