move make-sdist to where git-annex has it
Joey Hess
10 years ago
|
0 |
#!/bin/sh
|
|
1 |
#
|
|
2 |
# Workaround for `cabal sdist` requiring all included files to be listed
|
|
3 |
# in .cabal.
|
|
4 |
|
|
5 |
# Create target directory
|
|
6 |
sdist_dir=github-backup-$(grep '^Version:' github-backup.cabal | sed -re 's/Version: *//')
|
|
7 |
mkdir --parents dist/$sdist_dir
|
|
8 |
|
|
9 |
find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \
|
|
10 |
-or -not -name \\*.orig -not -type d -print \
|
|
11 |
| perl -ne "print unless length >= 100 - length q{$sdist_dir}" \
|
|
12 |
| xargs cp --parents --target-directory dist/$sdist_dir
|
|
13 |
|
|
14 |
cd dist
|
|
15 |
tar -caf $sdist_dir.tar.gz $sdist_dir
|
|
16 |
|
|
17 |
# Check that tarball can be unpacked by cabal.
|
|
18 |
# It's picky about tar longlinks etc.
|
|
19 |
rm -rf $sdist_dir
|
|
20 |
cabal unpack $sdist_dir.tar.gz
|
22 | 22 |
|
23 | 23 |
# Upload to hackage.
|
24 | 24 |
hackage: clean
|
25 | |
./make-sdist.sh
|
|
25 |
./Build/make-sdist.sh
|
26 | 26 |
@cabal upload dist/*.tar.gz
|
27 | 27 |
|
28 | 28 |
# hothasktags chokes on some template haskell etc, so ignore errors
|
0 | |
#!/bin/sh
|
1 | |
#
|
2 | |
# Workaround for `cabal sdist` requiring all included files to be listed
|
3 | |
# in .cabal.
|
4 | |
|
5 | |
# Create target directory
|
6 | |
sdist_dir=github-backup-$(grep '^Version:' github-backup.cabal | sed -re 's/Version: *//')
|
7 | |
mkdir --parents dist/$sdist_dir
|
8 | |
|
9 | |
find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \
|
10 | |
-or -not -name \\*.orig -not -type d -print \
|
11 | |
| perl -ne "print unless length >= 100 - length q{$sdist_dir}" \
|
12 | |
| xargs cp --parents --target-directory dist/$sdist_dir
|
13 | |
|
14 | |
cd dist
|
15 | |
tar -caf $sdist_dir.tar.gz $sdist_dir
|
16 | |
|
17 | |
# Check that tarball can be unpacked by cabal.
|
18 | |
# It's picky about tar longlinks etc.
|
19 | |
rm -rf $sdist_dir
|
20 | |
cabal unpack $sdist_dir.tar.gz
|