summaryrefslogtreecommitdiff
path: root/make-sdist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make-sdist.sh')
-rwxr-xr-xmake-sdist.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/make-sdist.sh b/make-sdist.sh
new file mode 100755
index 000000000..409871916
--- /dev/null
+++ b/make-sdist.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Create target directory
+sdist_dir=git-annex-$(grep '^Version:' git-annex.cabal | sed -re 's/Version: *//')
+mkdir --parents 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