Kaydet (Commit) d41f1866 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

simplify the determination of the bootstrap dir

üst 13756e65
...@@ -57,18 +57,13 @@ done ...@@ -57,18 +57,13 @@ done
if [ -z "$BOOTSTRAP_DIR" ]; then if [ -z "$BOOTSTRAP_DIR" ]; then
BOOTSTRAP_DIR=$(git rev-parse --git-dir 2>/dev/null) || die "Cannot use the current working directory as implicit source: Not a git repository" BOOTSTRAP_DIR=$(git rev-parse --show-toplevel 2>/dev/null) || die "Cannot use the current working directory as implicit source: Not a git repository"
if [ -n "$BOOTSTRAP_DIR" ] ; then
case "$BOOTSTRAP_DIR" in if [ "$(basename $(git config remote.origin.url))" != "bootstrap" ] ; then
.git) die "Cannot use the current working directory as implicit source: Not a bootstrap git repository"
BOOTSTRAP_DIR="$(pwd)" fi
;; fi
.)
cd .. && BOOTSTRAP_DIR=$(pwd)
;;
esac
fi fi
if [ -z "$DEST_DIR" ]; then if [ -z "$DEST_DIR" ]; then
echo "destination directory is missing." echo "destination directory is missing."
print_help $0 print_help $0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment