summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2017-07-22 20:27:14 (EDT)
committer P. J. McDermott <pj@pehjota.net>2017-07-22 20:27:14 (EDT)
commite23a5dd0a1b2818f795e995ea4c8bbadb25c8906 (patch)
tree151a18a579e1728f9f0b732ab06b570464a897ed /src
parent9b634032f8b303d54c726eb1a1d7e7b108ef6396 (diff)
main(): Detect execution from build directory
Diffstat (limited to 'src')
-rw-r--r--src/main.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.sh b/src/main.sh
index 09eec05..e8fd9f5 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -28,6 +28,8 @@ LF='
OPTSTRING='hVvb:'
# Global variables
+in_place=
+builddir=
loading_cmd=
base_dir=
conf_incoming_channel=
@@ -43,6 +45,14 @@ main()
local cmd=
local status=
+ if [ -f "${0%/*}/.builddirstamp" ]; then
+ in_place=true
+ builddir="${0%/*}"
+ else
+ in_place=false
+ builddir=''
+ fi
+
init_sigs
load_locale