Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Wrote a script to automate tarball creation for luarocks manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
amireh committed Jul 5, 2012
1 parent 0a27e9a commit 9b0edc9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
Empty file added .gitignore
Empty file.
Binary file removed lua_cliargs-1.1.tar.gz
Binary file not shown.
27 changes: 27 additions & 0 deletions 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
Binary file added tarballs/lua_cliargs-1.1.tar.gz
Binary file not shown.

0 comments on commit 9b0edc9

Please sign in to comment.