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:
parent
d4ad943699
commit
5682cf59ab
1 changed files with 7 additions and 3 deletions
|
|
@ -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.."
|
||||
|
|
|
|||
Loading…
Reference in a new issue