blob: 837dfbf2a75ca444e82c9e2ce1843e899999d307 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
# SPDX-License-Identifier: 0BSD
set -eu
test $# = 2 || {
cat >&2 <<-EOF
usage: $0 <ghc version> <annex version>
Create 'builds/git-annex-<annex version>-linux-amd64.tar.gz' from
files under ./git-annex/, most importantly the git-annex binary under
cabal's build directory for <ghc version> and <annex version>.
EOF
exit 2
}
version_ghc=$1
version_annex=$2
cabal_root=git-annex/dist-newstyle/build/x86_64-linux
binary=$cabal_root/ghc-$version_ghc/git-annex-$version_annex/build/git-annex/git-annex
pkg_root=builds/git-annex-$version_annex
mkdir -p "$pkg_root"
pkg_bin=$pkg_root/bin
mkdir "$pkg_bin"
cp "$binary" "$pkg_bin"/
ln -s git-annex "$pkg_bin"/git-annex-shell
ln -s git-annex "$pkg_bin"/git-remote-annex
ln -s git-annex "$pkg_bin"/git-remote-tor-annex
cp git-annex/COPYRIGHT "$pkg_root"/
pkg_man=$pkg_root/share/man/man1
mkdir -p "$pkg_man"
cp git-annex/man/*.1 "$pkg_man"/
gzip -9 "$pkg_man"/*.1
tar czf "$pkg_root"-linux-amd64.tar.gz -C builds git-annex-"$version_annex"
rm -r "$pkg_root"
|