Zenodo packaging hacks draft

Sat, 07 Dec 2024 14:04:26 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 07 Dec 2024 14:04:26 -0500
changeset 62
6d9de6d05ef7
parent 61
dee25743b84a

Zenodo packaging hacks

README.md file | annotate | diff | comparison | revisions
package.sh file | annotate | diff | comparison | revisions
--- a/README.md	Fri Mar 28 10:34:40 2025 -0500
+++ b/README.md	Sat Dec 07 14:04:26 2024 -0500
@@ -18,14 +18,8 @@
 
 ### Installing dependencies
 
-Most dependencies are managed by the Cargo build system of [Rust]. You will
-only need to manually install the “stable” Rust system itself.
-At the time of writing this README, [alg_tools] also needs to be downloaded
-separately.
-
-1. Install the [Rust] infrastructure (including Cargo) with [rustup].
-2. Download [alg_tools] and unpack it under the same directory as this
-   package.
+Most dependencies are managed by the Cargo build system of [Rust]. You will only need to
+manually install the “stable” Rust system itself. This can be done with [rustup].
 
   [rustup]: https://rustup.rs
   [alg_tools]: https://tuomov.iki.fi/software/alg_tools/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package.sh	Sat Dec 07 14:04:26 2024 -0500
@@ -0,0 +1,16 @@
+#!/bin/sh
+t=$(mktemp -d)
+v=$(sed 's/^version = \"\(.*\)\"/\1/p; d; q;' Cargo.toml |head -1)
+n="non-riemannian-opt-$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
+zip -q -r "$p/$f" "$n"

mercurial