summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-04 14:31:36 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-04 14:45:45 -0400
commit561897d54b236e27b785e7b7b637d9d610519f1e (patch)
tree8164c60b19672564f70491ffaba8b82e15ae8fff /src
parent8ef60cf9fef16dd7df5004f97f0c3fff232ca88a (diff)
toru-path: fix displaying the usage text if not configured
Diffstat (limited to 'src')
-rwxr-xr-xsrc/toru/toru-path5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/toru/toru-path b/src/toru/toru-path
index 4dcb811..7e90035 100755
--- a/src/toru/toru-path
+++ b/src/toru/toru-path
@@ -60,9 +60,7 @@ main() {
FORCE=${F:-false}
load_files libretools
- check_vars libretools TORUPATH REPOS || exit 1
load_files abs
- check_vars abs ABSROOT || exit 1
# TODO: add an option to override/augment libretools.conf:REPOS
if [[ $# != 0 ]]; then
if [[ $# == 1 && "$1" == '-h' ]]; then
@@ -73,6 +71,9 @@ main() {
return 2
fi
+ check_vars libretools TORUPATH REPOS || return 1
+ check_vars abs ABSROOT || return 1
+
if [ ! -w "$TORUPATH" ]; then
error "Toru's path isn't writable. Please check your TORUPATH: %q" "$TORUPATH"
exit 1