Created
January 20, 2015 04:10
-
-
Save josephabrahams/a3bec509fb1b85e3f3aa to your computer and use it in GitHub Desktop.
shc install script
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
#!/usr/bin/env bash | |
# Install shc <http://www.datsi.fi.upm.es/~frosal/> on Ubuntu 14.04 | |
# Requires build-essential | |
if [ ! $(whoami) == "root" ]; then | |
echo "Please run as root!" | |
exit 1 | |
fi | |
# download shc package to be compiled | |
mkdir -pv /tmp/shc | |
wget -P /tmp/shc http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz | |
# check md5sum | |
echo "c23efa23421d5bea57ff3c32d140d541 /tmp/shc/shc-3.8.9.tgz" | md5sum -c --quiet | |
if [ ! 0 -eq $? ]; then | |
echo "Failed md5 checksum. Aborting" | |
exit 1 | |
fi | |
# make shc man directory | |
mkdir -p /usr/local/man/man1 2>/dev/null | |
# install shc | |
tar -C /tmp/shc -zxvf /tmp/shc/shc-3.8.9.tgz | |
cd /tmp/shc/shc-3.8.9 | |
make | |
make install | |
# clean up | |
rm -rf /tmp/shc | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment