Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Created January 20, 2015 04:10
Show Gist options
  • Save josephabrahams/a3bec509fb1b85e3f3aa to your computer and use it in GitHub Desktop.
Save josephabrahams/a3bec509fb1b85e3f3aa to your computer and use it in GitHub Desktop.
shc install script
#!/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