Unify missing basedir error
This commit is contained in:
parent
b3c816b428
commit
5d5231e886
|
@ -257,11 +257,6 @@ FOUND_BASEDIR=0
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ $FOUND_BASEDIR -eq 1 ]; then
|
if [ $FOUND_BASEDIR -eq 1 ]; then
|
||||||
BASEDIR="$(readlink -m $arg)"
|
BASEDIR="$(readlink -m $arg)"
|
||||||
if [ ! -d $BASEDIR ]; then
|
|
||||||
i18n_basedir="$BASEDIR"
|
|
||||||
error "missing_basedir"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
FOUND_BASEDIR=0
|
FOUND_BASEDIR=0
|
||||||
elif [[ "$arg" = "-f" ]] || [[ "$arg" = "--force" ]]; then
|
elif [[ "$arg" = "-f" ]] || [[ "$arg" = "--force" ]]; then
|
||||||
info force_flag
|
info force_flag
|
||||||
|
@ -298,10 +293,11 @@ for arg in "$@"; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Still the default BASEDIR, if it doesn't exist we create it as a convenience
|
# Error when the requested basedir (or the default ~/.forgebuild) does not exist
|
||||||
if [ ! -d $BASEDIR ]; then
|
if [ ! -d $BASEDIR ]; then
|
||||||
echo "ERROR: No such basedir: $BASEDIR. Creating it and aborting"
|
i18n_basedir="$BASEDIR"
|
||||||
exit 1
|
error "missing_basedir"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# So scripts can know we're still running (for autoupdater)
|
# So scripts can know we're still running (for autoupdater)
|
||||||
|
|
Loading…
Reference in New Issue