package.sh

changeset 56
3a784e6e475a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package.sh	Mon Dec 05 23:50:22 2022 +0200
@@ -0,0 +1,17 @@
+#!/bin/sh
+t=$(mktemp -d)
+v=$(sed 's/^version = \"\(.*\)\"/\1/p; d;' Cargo.toml | head -1)
+n="pointsource_algs-$v"
+f="$n.zip"
+if test -f "$f"; then
+    echo "$n already exists"
+    exit 1
+fi
+echo "Assembling $f..."
+hg archive "$t/$n"
+rm "$t/$n/package.sh"
+hg -R ../alg_tools archive "$t/$n/alg_tools"
+p="$(pwd)"
+cd $t
+perl -p -i -e s:../alg_tools:alg_tools: $n/Cargo.toml
+zip -q -r "$p/$f" "$n"

mercurial