Add packaging script, remove alg_tools, measures, and pointsource_pde installation instruction from README. draft

Wed, 22 Apr 2026 23:46:40 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 22 Apr 2026 23:46:40 -0500
changeset 6
64bd740b12ed
parent 5
3e164c024a01

Add packaging script, remove alg_tools, measures, and pointsource_pde installation instruction from README.

README.md file | annotate | diff | comparison | revisions
package.sh file | annotate | diff | comparison | revisions
--- a/README.md	Fri May 08 17:28:21 2026 -0500
+++ b/README.md	Wed Apr 22 23:46:40 2026 -0500
@@ -138,9 +138,6 @@
     
         rustup toolchain install nightly
 
-3. Download [alg_tools], [pointsource_algs], and [measures] and unpack them under
-   the same directory as this package.
-
   [rustup]: https://rustup.rs
   [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
   [pointsource_algs]: https://tuomov.iki.fi/software/pointsource_algs/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package.sh	Wed Apr 22 23:46:40 2026 -0500
@@ -0,0 +1,24 @@
+#!/bin/sh
+t=$(mktemp -d)
+v=$(sed 's/^version = \"\(.*\)\"/\1/p; d;' Cargo.toml | head -1)
+n="pointsource_pde-$v"
+f="$n.zip"
+if test -f "$f"; then
+    echo "$n already exists"
+    exit 1
+fi
+echo "Assembling $f..."
+hg archive -X .gitignore -X .hgignore "$t/$n"
+rm "$t/$n/package.sh"
+deps="alg_tools pointsource_algs measures"
+for d in $deps; do
+    hg -R ../$d archive -X ../$d/.gitignore -X ../$d/.hgignore "$t/$n/$d"
+done
+mkdir "$t/$n/float_extras/"
+git -C ../float_extras archive HEAD | tar x -C "$t/$n/float_extras/"
+p="$(pwd)"
+cd $t
+for d in $deps; do
+    perl -p -i -e s:../$d:$d: $n/Cargo.toml
+done
+zip -q -r "$p/$f" "$n"

mercurial