diff options
author | Nathan Collins <nathan.collins@gmail.com> | 2012-06-12 02:36:05 -0700 |
---|---|---|
committer | Nathan Collins <nathan.collins@gmail.com> | 2012-06-12 02:36:05 -0700 |
commit | 79a71d9ba68818a62cbf96f3cf46d01ac662f836 (patch) | |
tree | 41b1f51333a8232aeb0f0ef231d8b422106c8da2 /make-sdist.sh | |
parent | 72b0054931cd0d41477fa7270154cb53d8e94e4d (diff) |
Simplify git-annex.cabal and generate sdist with make-sdist.sh.
The `cabal install` is happy as long as the files it needs are
present, but `cabal sdist` will only package up files you tell it to.
So, generate the source tarball ourselves.
The source tarball is generated by make-sdist.sh, which uses cabal
sdist to calculate the package name. Could also generate the name
from the 'Version:' field in git-annex.cabal.
Diffstat (limited to 'make-sdist.sh')
-rwxr-xr-x | make-sdist.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/make-sdist.sh b/make-sdist.sh new file mode 100755 index 000000000..debc5195e --- /dev/null +++ b/make-sdist.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Create target directory +cabal sdist +sdist_dir=$(basename dist/*.tar.gz .tar.gz) +rm -f dist/*.tar.gz +mkdir dist/$sdist_dir + +find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \ + -or -not -name \\*.orig -not -type d -print \ +| perl -ne 'print unless length >= 100' \ +| xargs cp --parents --target-directory dist/$sdist_dir + +cd dist +tar -caf $sdist_dir.tar.gz $sdist_dir |