Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wrote a script to automate tarball creation for luarocks manifest

  • Loading branch information...
commit 9b0edc9c169149c6f7b44e2c87458e62437c9203 1 parent 0a27e9a
@amireh authored
View
0  .gitignore
No changes.
View
BIN  lua_cliargs-1.1.tar.gz
Binary file not shown
View
27 tarballs/create_tarball.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+PKG="lua_cliargs"
+MAJOR=$1
+MINOR=$2
+FQN="${PKG}-${MAJOR}.${MINOR}"
+
+if [ -d "$FQN" ]; then
+ echo -en "Will not overwrite existing directory '$FQN'. "
+ echo -en "\e[00;31m[ FAILED ]\e[00m\n"
+ exit 1
+fi
+
+if [ -f "$FQN.tar.gz" ]; then
+ echo -en "Overwriting tar archive '$FQN.tar.gz'. "
+ echo -en "\e[00;33m[ WARNING ]\e[00m\n"
+
+ rm "$FQN.tar.gz"
+fi
+
+ln -s ../ "$FQN"
+tar --exclude-vcs --exclude=tarballs -hzvcf "$FQN.tar.gz" "$FQN"
+rm "$FQN"
+
+echo -en "Archive created: '$FQN'. "
+echo -en "\e[00;32m[ SUCCESS ]\e[00m\n"
+exit 0
View
BIN  tarballs/lua_cliargs-1.1.tar.gz
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.