Skip to content

Instantly share code, notes, and snippets.

@pbosetti
Last active December 25, 2015 12:09
Show Gist options
  • Save pbosetti/6974190 to your computer and use it in GitHub Desktop.
Save pbosetti/6974190 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [[ $EUID -ne 0 ]]; then
echo 1>&2
echo 1>&2
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 1>&2
echo "! This script must be run as root! !" 1>&2
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 1>&2
echo
exit 1
fi
echo
echo "************************************"
echo "Updating package list"
if ! apt-get update; then
echo "Could not update package list"
exit $?
fi
pkgs=(git-core build-essential gcc g++ cmake ruby ri ruby-dev chromium-browser gnuplot octave curl libreadline6-dev libssl-dev zlib1g-dev)
echo
echo "************************************"
echo "Installing packages"
for p in ${pkgs[@]}
do
echo
echo "Installing ${p}"
echo "---------------"
if ! apt-get install -y --force-yes ${p}; then
echo "Error while installing ${p}"
exit $?
fi
done
echo
echo "************************************"
echo " ALL DONE!"
echo "************************************"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment