Add script for packaging for Zenodo

Fri, 03 May 2024 12:32:58 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Fri, 03 May 2024 12:32:58 -0500
changeset 55
49cc73ebf939
parent 54
0740d837b79b
child 56
cfce789d9749

Add script for packaging for Zenodo

package.sh file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package.sh	Fri May 03 12:32:58 2024 -0500
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Script for packaging for Zenodo, including custom dependencies.
+# Needs toml-cli; install it with cargo install toml-cli
+#
+
+version=$(toml get -r Project.toml version)
+name="PredictPDPS-$version"
+dir="$TMPDIR/$name"
+
+hg archive "$dir"
+hg archive -R ../ImageTools "$dir/ImageTools"
+hg archive -R ../AlgTools "$dir/AlgTools"
+perl -p -i -e 's:../(ImageTools|AlgTools):$1:' "$dir/Manifest.toml"
+
+# Something creates .DS_Store files although they are not in the repo,
+# so need to explicitly exclude them.
+tar  cz --exclude .DS_Store -C "$TMPDIR" -f $name.tar.gz $name

mercurial