aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/sync-media4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index 6486198..defa443 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -184,7 +184,7 @@ $sudo chown $WHOAMI. $CACHE/*
sync_media_incoming_perms
# Check if a specific repository was passed via the command line
-if [ -z "$REPOSITORY" ] && [ -d "$CACHE/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q '--'; then
+if [ ! -z "$REPOSITORY" ] && [ -d "$CACHE/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q -- '--'; then
REPOSITORIES="$REPOSITORY"
else
REPOSITORIES="`ls $CACHE`"
@@ -246,7 +246,7 @@ done
# Process removable or remote media
if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
# Check if a specific repository was passed via the command line
- if [ -z "$REPOSITORY" ] && [ -d "$VOLUME/$MEDIA/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q '--'; then
+ if [ ! -z "$REPOSITORY" ] && [ -d "$VOLUME/$MEDIA/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q -- '--'; then
REPOSITORIES="$REPOSITORY"
else
REPOSITORIES="`ls $VOLUME/$MEDIA`"