summaryrefslogtreecommitdiff
path: root/src/abslibre-tools/librerelease
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-24 15:17:59 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-24 16:24:13 -0400
commit05128d533225b75f35f79a1f55b04556b7e9736b (patch)
treea2e8d723e76fd8e44c81ea0fbe1ad4dda597856d /src/abslibre-tools/librerelease
parentd712e575c0d5b1bf66443beec3e7ed75be636e2d (diff)
Merge conf.sh:load_files and conf.sh:check_vars into load_conf
Diffstat (limited to 'src/abslibre-tools/librerelease')
-rwxr-xr-xsrc/abslibre-tools/librerelease19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 51cf6de..e673081 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -164,21 +164,10 @@ main() {
return 0
fi
- # defer exiting on errors until we've tried to parse *all*
- # config files, to have more complete error messages.
- local err=false
- {
- load_files makepkg &&
- check_vars makepkg GPGKEY
- } || err=true
- {
- load_files libretools &&
- # the HOOK* are settings are optional
- check_vars libretools WORKDIR REPODEST ABSLIBREDEST # HOOKPRERELEASE HOOKPOSTRELEASE
- } || err=true
- if $err; then
- return 6
- fi
+ declare -i ret=0
+ load_conf makepkg.conf GPGKEY || ret=$?
+ load_conf libretools.conf WORKDIR REPODEST ABSLIBREDEST || ret=$? # and HOOK{PRE,POST}RELEASE, which are optional
+ [[ $ret = 0 ]] || exit $ret
local re_url='^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$'
local re_authority='^(([^@]*)@)?([^][@:]*|\[[^]]*\])(:([0-9]*))?$'