package.sh

Mon, 05 Dec 2022 23:50:22 +0200

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 05 Dec 2022 23:50:22 +0200
changeset 27
a848c2c5a2e4
permissions
-rw-r--r--

Zenodo packaging hacks

#!/bin/sh
t=$(mktemp -d)
v=$(cat Cargo.toml |sed 's/^version = \"\(.*\)\"/\1/p; d;')
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
zip -q -r "$p/$f" "$n"

mercurial