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

Copied git-update script that's under construction to public repo

This commit is contained in:
Michiel Scholten
2014-07-17 20:56:36 +02:00
parent 2b2a86a465
commit 8a24e9b253

31
bin/update_repos Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
#value=`cat config.txt`
#echo "$value"
WORKSPACE="$HOME/workspace/projects"
if [ ! -e $WORKSPACE ]; then
mkdir -p $WORKSPACE
fi
GITHUBUSER=aquatix
REPOS="dotfiles ns-api"
for REPO in $REPOS; do
cd $WORKSPACE/github
if [ -e $REPO ]; then
cd $REPO
#git diff --quiet || echo "[c] skipping"
git diff --quiet
if [ $? > 0 ]; then
echo -e "[\e[31mX\e[0m] $REPO changed - $WORKSPACE/github/$REPO"
else
echo -e "[\e[32mU\e[0m] $REPO"
#git pull
fi
else
#git clone $REPO
echo -e "[\e[33mC\e[0m] $REPO"
fi
done