summaryrefslogtreecommitdiff
path: root/hib-dlagent
diff options
context:
space:
mode:
authorThomas Riccardi <riccardi.thomas@gmail.com>2013-06-09 01:56:28 +0200
committerThomas Riccardi <riccardi.thomas@gmail.com>2013-06-09 01:56:28 +0200
commit3a80e4a5832d63417aad5634c464f16b172d0893 (patch)
treeab071437168c948787e4157c5401c2e8fb9aa934 /hib-dlagent
parent0714b98fc9337912bae0c6190b0a740277c9f922 (diff)
downloadhib-dlagent-3a80e4a5832d63417aad5634c464f16b172d0893.tar.gz
hib-dlagent-3a80e4a5832d63417aad5634c464f16b172d0893.zip
If file is found in STORAGE directory, no need for a key or user.
Diffstat (limited to 'hib-dlagent')
-rwxr-xr-xhib-dlagent18
1 files changed, 9 insertions, 9 deletions
diff --git a/hib-dlagent b/hib-dlagent
index 70e22f4..84f8898 100755
--- a/hib-dlagent
+++ b/hib-dlagent
@@ -103,6 +103,15 @@ main() {
DESTINATION="${FILE##*/}"
fi
+ if [ -n "$STORAGE" ]; then
+ STORAGE_FILE=$(/usr/bin/find "$STORAGE" -name "$FILE")
+ if [ -n "$STORAGE_FILE" ]; then
+ echo "Found file: $STORAGE_FILE"
+ ln -s "$STORAGE_FILE" "$DESTINATION"
+ return;
+ fi
+ fi
+
if [ -n "$USERNAME" ]; then
login;
LISTING_PAGES+=("$HOME_PAGE")
@@ -117,15 +126,6 @@ main() {
exit 1
fi
- if [ -n "$STORAGE" ]; then
- STORAGE_FILE=$(/usr/bin/find "$STORAGE" -name "$FILE")
- if [ -n "$STORAGE_FILE" ]; then
- echo "Found file: $STORAGE_FILE"
- ln -s "$STORAGE_FILE" "$DESTINATION"
- return;
- fi
- fi
-
for LISTING_PAGE in "${LISTING_PAGES[@]}"; do
URL=$(discover_url "$LISTING_PAGE")
if [ -n "$URL" ]; then break; fi