Codebase list github-backup / 888864a
move make-sdist to where git-annex has it Joey Hess 10 years ago
3 changed file(s) with 22 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
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
2222
2323 # Upload to hackage.
2424 hackage: clean
25 ./make-sdist.sh
25 ./Build/make-sdist.sh
2626 @cabal upload dist/*.tar.gz
2727
2828 # hothasktags chokes on some template haskell etc, so ignore errors
+0
-21
make-sdist.sh less more
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