summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-25 22:54:52 -0700
committerMichael Forney <mforney@mforney.org>2016-06-25 22:54:52 -0700
commitadec4a1094dc5cb1a4c9a269532eddc17112e273 (patch)
treefe5feb412a2fc2674fe59bcb88bb6c6b208908d1
parent4eb283ce9e6b5377a7ce41d834fdc8e9c49e7489 (diff)
Fix perms-hook invocation in /etc
-rw-r--r--README.md4
-rw-r--r--template/config2
-rwxr-xr-xtemplate/hooks/post-checkout2
-rwxr-xr-xtemplate/hooks/post-merge2
4 files changed, 6 insertions, 4 deletions
diff --git a/README.md b/README.md
index 9fa9118c..83e7cd71 100644
--- a/README.md
+++ b/README.md
@@ -90,14 +90,14 @@ Build oasis.
Prepare root repository.
cd $ROOT
- git init --template src/oasis/out/template
+ git init --template src/oasis/template
git remote add local src/oasis/out/root.git
git fetch local
git checkout master
Prepare your `/etc` repository.
- git clone --template src/oasis/out/template https://github.com/michaelforney/oasis-etc etc
+ git clone --template src/oasis/template --config 'oasis.root=..' https://github.com/michaelforney/oasis-etc etc
Set up your system configuration.
diff --git a/template/config b/template/config
index 0a010eff..a21d44a8 100644
--- a/template/config
+++ b/template/config
@@ -1,3 +1,5 @@
[core]
sharedRepository = 0600
sparseCheckout = true
+[oasis]
+ root = .
diff --git a/template/hooks/post-checkout b/template/hooks/post-checkout
index 2a619e25..c7ab2433 100755
--- a/template/hooks/post-checkout
+++ b/template/hooks/post-checkout
@@ -9,4 +9,4 @@ else
set "$old" "$new"
fi
-exec ./libexec/oasis/perms-hook "$@"
+exec "$(git config oasis.root)"/libexec/oasis/perms-hook "$@"
diff --git a/template/hooks/post-merge b/template/hooks/post-merge
index f69e5466..f8c7404f 100755
--- a/template/hooks/post-merge
+++ b/template/hooks/post-merge
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./libexec/oasis/perms-hook ORIG_HEAD HEAD
+exec "$(git config oasis.root)"/libexec/oasis/perms-hook ORIG_HEAD HEAD