Repo containing scripts to be used with dovel, and git hooks that powers our web interface.
Author: blmayer (bleemayer@gmail.com)
Date: Fri Oct 6 15:04:25 2023 -0300
Parent: 5579835
Fixed go mod zip - Improved curl command
diff --git a/aux.sh b/aux.sh index 846abc3..9540874 100755 --- a/aux.sh +++ b/aux.sh @@ -63,7 +63,7 @@ pagesummary() { </nav> <p><i>$(cat description)</i></p> </center> - <kbd>curl https://dovel.email/$1.tar</kbd> + <kbd>curl -O https://dovel.email/$1.tar</kbd> <a style="float:right" href=/$1.tar filename=$1.tar>tar</a> EOF }
diff --git a/post-receive b/post-receive index 945c1ff..275886d 100755 --- a/post-receive +++ b/post-receive @@ -256,13 +256,14 @@ initmail() { # first argument should be the version, e.g. v0.1.0 creategomod() { TMP="$(mktemp -d)" - git --work-tree="$TMP" checkout -f main + mkdir -p "$TMP/dovel.email/$REPO@$1" + git --work-tree="$TMP/dovel.email/$REPO@$1/" checkout -f main [ -d "$OUT/@latest" ] || mkdir -p "$OUT/@latest" [ -d "$OUT/@v/$1" ] || mkdir -p "$OUT/@v/$1" - find "$TMP/"* -print | sed "s:$TMP/:dovel.email/$REPO@v$1:" | zip -@ > "$OUT/@v/$1.zip" - cp "$OUT/$1.zip" "$OUT/@latest/" + $(cd "$TMP"; zip "$OUT/@v/$1" -r *) + cp "$OUT/@v/$1.zip" "$OUT/@latest/" rm -rf "$TMP" }