summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rwxr-xr-xmk15
1 files changed, 9 insertions, 6 deletions
diff --git a/mk b/mk
index f358bc3a..3a3105de 100755
--- a/mk
+++ b/mk
@@ -5,7 +5,10 @@
set -u -e
-if [ "./${0##*/}" != "${0}" ] || [ ! -f "mk" ] || [ -L "mk" ]; then
+ispwd="true"
+[ "$0" = "./mk" ] || ispwd="false"
+[ "$ispwd" = "true" ] && [ -L "mk" ] && ispwd="false"
+if [ "$ispwd" = "false" ]; then
printf "You must run this in the proper work directory.\n" 1>&2
exit 1
fi
@@ -13,8 +16,8 @@ fi
. "include/lib.sh"
. "include/init.sh"
. "include/vendor.sh"
-. "include/inject.sh"
. "include/mrc.sh"
+. "include/inject.sh"
. "include/rom.sh"
. "include/release.sh"
. "include/get.sh"
@@ -26,17 +29,17 @@ main()
case "$cmd" in
version) printf "%s\nWebsite: %s\n" "$relname" "$projectsite" ;;
release|download|inject) $cmd "$@" ;;
- -*) return 0 ;;
- *) err "bad command" ;;
+ -*) return 1 ;;
+ *) err "bad command" main "$@" ;;
esac
set -u -e # some commands disable them. turn them on!
- return 1
}
-main "$@" || exit 0
+main "$@" && exit 0
. "include/tree.sh"
trees "$@" || exit 0
+x_ touch "$mkhelpercfg"
. "$mkhelpercfg"
$cmd