commit 83e040787bde8138ac673532e3bdb37d8199ed4a
parent 636ecb298124f925bb9ddb2859d6c3ea3301ec46
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date: Sat, 14 Aug 2021 14:54:22 +0200
Update the variables
Diffstat:
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/create.sh b/create.sh
@@ -16,7 +16,7 @@
# - sh example_create.sh
# path must be absolute.
-reposdir="/var/www/domains/git.codemadness.nl/home/src"
+reposdir="/var/www/git"
curdir="$(pwd)"
# make index.
@@ -31,7 +31,7 @@ for dir in "${reposdir}/"*/; do
mkdir -p "${curdir}/${d}"
cd "${curdir}/${d}" || continue
- stagit -c ".cache" -u "https://git.codemadness.nl/$d/" "${reposdir}/${r}"
+ stagit -c ".cache" -u "https://git.dimitrijedobrota.com/$d/" "${reposdir}/${r}"
# symlinks
ln -sf log.html index.html
diff --git a/post-receive.sh b/post-receive.sh
@@ -19,9 +19,9 @@ fi
# config
# paths must be absolute.
-reposdir="/home/src/src"
+reposdir="/var/www/git"
dir="${reposdir}/${name}"
-htmldir="/home/www/domains/git.codemadness.org/htdocs"
+htmldir="/var/www/git-front"
stagitdir="/"
destdir="${htmldir}${stagitdir}"
cachefile=".htmlcache"
@@ -34,17 +34,17 @@ fi
cd "${dir}" || exit 1
# detect git push -f
-force=0
-while read -r old new ref; do
- test "${old}" = "0000000000000000000000000000000000000000" && continue
- test "${new}" = "0000000000000000000000000000000000000000" && continue
+force=1
+# while read -r old new ref; do
+# test "${old}" = "0000000000000000000000000000000000000000" && continue
+# test "${new}" = "0000000000000000000000000000000000000000" && continue
- hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q)
- if test -n "${hasrevs}"; then
- force=1
- break
- fi
-done
+# hasrevs=$(git rev-list "${old}" "^${new}" | sed 1q)
+# if test -n "${hasrevs}"; then
+# force=1
+# break
+# fi
+# done
# strip .git suffix.
r=$(basename "${name}")
@@ -64,7 +64,7 @@ fi
stagit-index "${reposdir}/"*/ > "${destdir}/index.html"
# make pages.
-stagit -c "${cachefile}" -u "https://git.codemadness.nl/$d/" "${reposdir}/${r}"
+stagit -c "${cachefile}" -u "https://git.dimitrijedobrota.com/$d/" "${reposdir}/${r}"
ln -sf log.html index.html
ln -sf ../style.css style.css