Created
February 10, 2014 13:09
-
-
Save rasschaert/8915657 to your computer and use it in GitHub Desktop.
Creates RPM and Debian packages for gitsh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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