1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-07 00:05:10 +01:00

Fleshing out the configurable part

This commit is contained in:
Michiel Scholten
2014-07-17 21:08:54 +02:00
parent 8a24e9b253
commit cc2ccceef3

View File

@@ -12,20 +12,29 @@ fi
GITHUBUSER=aquatix
REPOS="dotfiles ns-api"
for GROUP in $GROUPS; do
if [ ! -e $GROUP ]; then
mkdir $WORKSPACE/$GROUP
fi
for REPO in $REPOS; do
cd $WORKSPACE/github
if [ -e $REPO ]; then
cd $REPO
cd $WORKSPACE/$GROUP
REPODIR=$(basename "$REPO")
#extension="${filename##*.}"
REPODIR="${REPODIR%.*}"
if [ -e $REPODIR ]; then
cd $REPODIR
#git diff --quiet || echo "[c] skipping"
git diff --quiet
if [ $? > 0 ]; then
echo -e "[\e[31mX\e[0m] $REPO changed - $WORKSPACE/github/$REPO"
echo -e "[\e[31mX\e[0m] $GROUP/$REPODIR changed - $WORKSPACE/$GROUP/$REPO"
else
echo -e "[\e[32mU\e[0m] $REPO"
echo -e "[\e[32mU\e[0m] $GROUP/$REPODIR"
#git pull
fi
else
#git clone $REPO
echo -e "[\e[33mC\e[0m] $REPO"
echo -e "[\e[33mC\e[0m] $GROUP/$REPODIR"
fi
done
done