mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 00:05:10 +01:00
Copied git-update script that's under construction to public repo
This commit is contained in:
31
bin/update_repos
Executable file
31
bin/update_repos
Executable 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
|
||||||
Reference in New Issue
Block a user