Browse Source

bootstrap: allow bootstrap execution from any directory

Evgeny Grin (Karlson2k) 10 years ago
parent
commit
12a4dd01cc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      bootstrap

+ 2 - 0
bootstrap

@@ -1,3 +1,5 @@
 #!/bin/sh
+test -n "$BASH_SOURCE" && workdir="${BASH_SOURCE[0]%/*}" && test -n "$workdir" && cd "$workdir" || \
+workdir=`dirname "$0"` && test -n "$workdir" && cd "$workdir" || echo "Warning: can't get working directory" 1>&2
 aclocal -I m4 --install
 autoreconf -I m4 -f -i