package.sh

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
permissions
-rw-r--r--

Zenodo packaging hacks

#!/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