Skip to content

Instantly share code, notes, and snippets.

@Trip09
Created January 23, 2020 18:39
Show Gist options
  • Save Trip09/d3d119c8547b8953b33f7e42552356e3 to your computer and use it in GitHub Desktop.
Save Trip09/d3d119c8547b8953b33f7e42552356e3 to your computer and use it in GitHub Desktop.
WIP - script sync home and work
#!/bin/bash
cd /code/wemystic
# git ls-files --others --exclude-standard
for i in `ls -d ./*/ | cut -d / -f 2`
do
cd $i
if [ -d .git ]
then
echo "## GIT >> $i << ##"
if [ "$(git status -s -unormal --no-column --porcelain|wc -l)" -gt 0 ]
then
echo "## GIT >> CHANGES << ##"
git status -s -unormal --no-column --porcelain
fi
else
echo "## NOT A GIT FOLDER >> $i << ##"
fi
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment