# HG changeset patch # User Tuomo Valkonen # Date 1714757578 18000 # Node ID 49cc73ebf93991935c287a1acbc64f66da5d1d3d # Parent 0740d837b79bc62eec13363cb021a88b79da0bc9 Add script for packaging for Zenodo diff -r 0740d837b79b -r 49cc73ebf939 package.sh --- /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