# Creates a new git repository in $1, adds a new remote named $2 and fetches
# the master on $3. If the git repository already exists a new remote $2 for
# $3 is added. If the remote already exists nothing happens.
# Creates a new git repository in $1, adds a new remote named $2 and fetches
# the master on $3. If the git repository already exists a new remote $2 for
# $3 is added. If the remote already exists nothing happens.
echo "Adding remote '$2' to '$1'."
git remote add -t master "$2" "$3/$1"
git fetch "$2" > /dev/null
echo "Adding remote '$2' to '$1'."
git remote add -t master "$2" "$3/$1"
git fetch "$2" > /dev/null
- [ -d "$project" ] && (echo "running setup.sh in '$project'";
- cd "$project/.."; ./setup.sh > /dev/null)
+ project=`echo "$path" | sed 's|/setup.sh$||'`
+
+ echo "running setup.sh in '$project'"
+ ( cd "$project"; ./setup.sh > /dev/null )
done
# Create git repository if necessary and/or additional remotes and fetch them.
elif [ "$#" -ge "2" ]; then
done
# Create git repository if necessary and/or additional remotes and fetch them.
elif [ "$#" -ge "2" ]; then