From acc9252b49b8cbfd979b6bbb95be65982d11add4 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Thu, 17 Jul 2014 21:30:21 +0200 Subject: [PATCH] Read config dirs --- bin/update_repos | 50 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/bin/update_repos b/bin/update_repos index 9e355da..44cdc22 100755 --- a/bin/update_repos +++ b/bin/update_repos @@ -9,16 +9,46 @@ if [ ! -e $WORKSPACE ]; then mkdir -p $WORKSPACE fi -GITHUBUSER=aquatix -REPOS="dotfiles ns-api" +#GRPS=`cat ~/.git_groups` +#GRPS=$(<~/.git_groups) +#GRPS=$(<$HOME/.privdotfiles/git_groups) +echo `pwd` -for GROUP in $GROUPS; do - if [ ! -e $GROUP ]; then - mkdir $WORKSPACE/$GROUP +saveIFS="$IFS" +IFS=$'\n' +GRPS=($(<~/.git_groups)) +IFS="$saveIFS" +#echo ${GRPS[0]} + +#GRPS=$( 0 ]; then - echo -e "[\e[31mX\e[0m] $GROUP/$REPODIR changed - $WORKSPACE/$GROUP/$REPO" + echo -e "[\e[31mX\e[0m] $GRP/$REPODIR changed - $WORKSPACE/$GRP/$REPO" else - echo -e "[\e[32mU\e[0m] $GROUP/$REPODIR" + echo -e "[\e[32mU\e[0m] $GRP/$REPODIR" #git pull fi else #git clone $REPO - echo -e "[\e[33mC\e[0m] $GROUP/$REPODIR" + echo -e "[\e[33mC\e[0m] $GRP/$REPODIR" fi done done