summaryrefslogtreecommitdiff
path: root/make-sdist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make-sdist.sh')
-rwxr-xr-xmake-sdist.sh15
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