Created
February 3, 2012 21:46
-
-
Save makinde/1732876 to your computer and use it in GitHub Desktop.
Arc Setup (Ubuntu)
This file contains 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 | |
if ! hash git &> /dev/null || ! hash php &> /dev/null; then | |
echo -e " *****\n ***** INSTALLING GIT AND PHP\n *****" | |
if hash apt-get &> /dev/null; then | |
sudo apt-get install git-core php5-cli php5-curl | |
elif hash port &> /dev/null; then | |
sudo port install php5-curl | |
elif hash fink &> /dev/null; then | |
sudo fink install git php5-curl | |
elif hash yum &> /dev/null; then | |
sudo yum install git php-curl | |
fi | |
fi | |
if [ ! -d ~/.arc_install ]; then | |
echo -e " *****\n ***** CLONING THE ARC TOOL\n *****" | |
mkdir ~/.arc_install | |
git clone git://github.com/facebook/libphutil.git ~/.arc_install/libphutil | |
git clone git://github.com/facebook/arcanist.git ~/.arc_install/arcanist | |
else | |
echo -e " *****\n ***** UPDATING ARC\n *****" | |
pushd ~/.arc_install/libphutil/ > /dev/null | |
git pull | |
cd ~/.arc_install/arcanist/ | |
git pull | |
popd > /dev/null | |
fi | |
if [ ! -f ~/.arcrc ]; then | |
~/.arc_install/arcanist/bin/arc install-certificate https://tails.corp.dropbox.com | |
fi | |
if ! hash arc &> /dev/null; then | |
echo -e "\n******************************************************\n" | |
echo " Add \"~/.arc_install/arcanist/bin\" to your path" | |
echo -e "\n******************************************************" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great script, thanks!