Detect fails in setup script
- by Lai Yu-Hsuan
I wrote a setup script to install my prefered programs and settings after I got a new server.
apt-get install git
git clone http://[email protected] .vim
ln -s .vimrc .vim/vimrc
...
But if something wrong happens during setup, how can I interrupt the setup script, and log the error(s)? For example, if github server is down, it's obviously useless to create a symbolic link to non-existed vimrc.
(or you have a better approach to initialize a server?)