package.sh

Mon, 06 May 2024 20:03:44 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 06 May 2024 20:03:44 -0500
changeset 62
a66e4b605ca2
parent 55
49cc73ebf939
permissions
-rw-r--r--

Add arXiv link for new paper to README

55
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
1 #!/bin/sh
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
2 #
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
3 # Script for packaging for Zenodo, including custom dependencies.
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
4 # Needs toml-cli; install it with cargo install toml-cli
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
5 #
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
6
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
7 version=$(toml get -r Project.toml version)
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
8 name="PredictPDPS-$version"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
9 dir="$TMPDIR/$name"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
10
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
11 hg archive "$dir"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
12 hg archive -R ../ImageTools "$dir/ImageTools"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
13 hg archive -R ../AlgTools "$dir/AlgTools"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
14 perl -p -i -e 's:../(ImageTools|AlgTools):$1:' "$dir/Manifest.toml"
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
15
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
16 # Something creates .DS_Store files although they are not in the repo,
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
17 # so need to explicitly exclude them.
49cc73ebf939 Add script for packaging for Zenodo
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
18 tar cz --exclude .DS_Store -C "$TMPDIR" -f $name.tar.gz $name

mercurial