mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 22:55:10 +01:00
32 lines
637 B
Bash
Executable File
32 lines
637 B
Bash
Executable File
#!/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
|