commit eabe4fae900b3ea32fc8a97ea6724099b079c7f9
parent a7798e0d472af57305d85f712dd3ed7ad3924d04
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Mon, 17 Jan 2022 20:08:29 +0100
Fix init script call to realpath
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/i b/i
@@ -9,12 +9,14 @@ p=$(echo "$1" | sed 's/\.git$\|$/.git/i')
[ -e "$p" ] && echo "$p is already a file or directory." && exit 1
+curr_dir="$(dirname "$(realpath "$0")")"
+
# create and initialise the repository
mkdir "$p" && \
cd "$p" && \
git --bare init
ln -sf "/usr/local/share/doc/stagit/example_post-receive.sh" "hooks/post-receive"
-ln -sf "$(dirname "$(realpath "$0")")/non-interactive/post-update-hook" "hooks/post-update"
+ln -sf "$curr_dir/non-interactive/post-update-hook" "hooks/post-update"
echo "Oscar Benedito" > "owner"
echo "https://git.oscarbenedito.com/${p%.git}" > "url"