Added a check on if the user has already cloned and also a set -e to exit immediately if a command exits with a non-zero status.

This commit is contained in:
hemanth 2010-09-18 02:28:13 +08:00 committed by Raphael Sofaer
parent d4ad943699
commit 5682cf59ab

View file

@ -2,7 +2,9 @@
# Author : hemanth.hm@gmail.com
# Site : www.h3manth.com
# This script helps to setup diaspora.
#
# Exit immediately if a command exits with a non-zero status.
set -e
# Set extented globbing
shopt -s extglob
@ -82,9 +84,11 @@ echo "Installed blunder.."
# Take a clone of Diaspora
(
echo "Clone diaspora source.."
git clone http://github.com/diaspora/diaspora.git
# Check if the user is already in a cloned source if not clone the source
[[ $( basename $PWD ) == "diaspora" ]] && echo "Already in diaspora directory" || git clone http://github.com/diaspora/diaspora.git ; cd diaspora
echo "Cloned the source.."
# Install extra gems
cd diaspora
echo "Installing more gems.."