diff options
author | Thomas Riccardi <riccardi.thomas@gmail.com> | 2013-06-09 01:56:28 +0200 |
---|---|---|
committer | Thomas Riccardi <riccardi.thomas@gmail.com> | 2013-06-09 01:56:28 +0200 |
commit | 3a80e4a5832d63417aad5634c464f16b172d0893 (patch) | |
tree | ab071437168c948787e4157c5401c2e8fb9aa934 /hib-dlagent | |
parent | 0714b98fc9337912bae0c6190b0a740277c9f922 (diff) | |
download | hib-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-x | hib-dlagent | 18 |
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 |