let's sync sticks
[jprojects-scripts.git] / check-untracked.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh
4
5 for project in ${LIST}; do
6         if [ "${project}" = "jprojects-scripts" ]
7         then
8                 echo "$0: Skipping jprojects-scripts ..."
9                 continue
10         elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
11         then
12                 echo "$0: Project '${project}' does not exist."
13                 continue
14         fi
15
16         echo "$0: Checking '${project}' ..."
17         cd "${JPROJECTS_HOME}/${project}"
18         STATUS=`git status`
19         UNTRACKED=`echo "${STATUS}" | grep "Untracked files:"`
20         if [ -n "${UNTRACKED}" ]
21         then
22                 echo "${STATUS}"
23         fi
24 done
25
26 echo "$0: All done."
27 exit 0