summaryrefslogtreecommitdiffstats
path: root/rubygem-pathspec-generate-tarball.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rubygem-pathspec-generate-tarball.sh')
-rwxr-xr-xrubygem-pathspec-generate-tarball.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/rubygem-pathspec-generate-tarball.sh b/rubygem-pathspec-generate-tarball.sh
new file mode 100755
index 0000000..91f0811
--- /dev/null
+++ b/rubygem-pathspec-generate-tarball.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+
+VERSION=0.0.2
+
+GITHUBURL=https://github.com/highb/pathspec-ruby/archive/${VERSION}.zip
+
+
+# download zipball
+if [[ ! -f pathspec-ruby-$VERSION.zip ]]; then
+ curl -o pathspec-ruby-$VERSION.zip -L $GITHUBURL
+fi
+
+# extract zipball
+[[ -d pathspec-ruby-$VERSION ]] && rm -r pathspec-ruby-$VERSION
+unzip pathspec-ruby-$VERSION.zip
+
+pushd pathspec-ruby-$VERSION
+ # repack
+ tar -cJvf pathspec-ruby-$VERSION-tests.tar.xz spec
+ mv pathspec-ruby-$VERSION-tests.tar.xz ..
+popd
+
+# Clean up
+rm pathspec-ruby-$VERSION.zip
+rm -r pathspec-ruby-$VERSION