#!/bin/bash # # Clone the rest of the remote repositories to have the complete ooo-build # sources usage() { cat 1>&2 <&2 echo 1>&2 usage fi # skip the repo where we are SKIP="$SKIP,`echo $ORIGIN | sed 's#.*/\([^/]\+\)/\?$#\1#'`" # do the work for DIR in $COMPONENTS do # skip? ( echo "$SKIP" | grep "\<$DIR\>" > /dev/null 2>&1 ) && continue # already cloned? [ -d ../$DIR ] && { echo "* Not clonnig $DIR, already exists" ; continue ; } # clone! echo "* Cloning $DIR..." ( cd .. ; git clone "$REPO/$DIR" ) done