Skip to content

Instantly share code, notes, and snippets.

@rasschaert
Created February 10, 2014 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rasschaert/8915657 to your computer and use it in GitHub Desktop.
Save rasschaert/8915657 to your computer and use it in GitHub Desktop.
Creates RPM and Debian packages for gitsh.
#!/bin/bash
DIRECTORY=$(cd $(dirname $0) && pwd)
ARCH=$(uname -m)
echo "Downloading archive"
curl -O http://thoughtbot.github.io/gitsh/gitsh-0.3.tar.gz
echo "Extracting archive"
tar -zxf gitsh-0.3.tar.gz
echo "Preparing for compilation"
cd gitsh-0.3
./configure
echo "Compiling"
make
echo "Installing to temporary directory"
make install DESTDIR=${DIRECTORY}/installdir
echo "Creating packages"
cd $DIRECTORY
fpm -s dir -t rpm -n gitsh -v 0.3 -a $ARCH -C installdir .
fpm -s dir -t deb -n gitsh -v 0.3 -a $ARCH -C installdir .
echo "Cleaning up"
rm -f gitsh-0.3.tar.gz
rm -rf installdir
rm -rf gitsh-0.3
echo 'Done!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment