summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-06-20 21:38:39 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-06-20 21:40:32 -0400
commit78773bf0f927c66f6e74a6bda9a0737c1d4e0f8a (patch)
tree301672307a7fd2f3255bbfe23189627cd63a040f
parenta1f8923dcfa565bf3907c604fdbee85fccee81d1 (diff)
librerelease: Fix REPODEST validation criteria
-rwxr-xr-xsrc/abslibre-tools/librerelease13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index abf86dd..2da919f 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -185,15 +185,18 @@ main() {
REPODEST_userinfo=${BASH_REMATCH[2]}
REPODEST_host=${BASH_REMATCH[3]}
REPODEST_port=${BASH_REMATCH[5]}
+
+ if [[ "$REPODEST_host" = '['*']' ]]; then
+ REPODEST_host=${REPODEST_HOST#'['}
+ REPODEST_host=${REPODEST_HOST#']'}
+ fi
else
REPODEST_ok=false
fi
[[ $REPODEST_scheme == ssh ]] || REPODEST_ok=false
- [[ -n $REPODEST_authority ]] || REPODEST_ok=false
+ [[ -n $REPODEST_host ]] || REPODEST_ok=false
[[ -n $REPODEST_path ]] || REPODEST_ok=false
- [[ -n $REPODEST_userhost ]] || REPODEST_ok=false
-
fi
if ! $REPODEST_ok; then
error 'The format of libretools.conf:REPODEST has changed.'
@@ -208,10 +211,6 @@ main() {
return $EXIT_NOTCONFIGURED
fi
fi
- if [[ "$REPODEST_host" = '['*']' ]]; then
- REPODEST_host=${REPODEST_HOST#'['}
- REPODEST_host=${REPODEST_HOST#']'}
- fi
REPODEST_userhost="${REPODEST_userinfo:+${REPODEST_userinfo%%:*}@}${REPODEST_host}"
"$mode"