Continued a bit:
[jprojects-scripts.git] / check-untracked.sh
index 7216a7e..1bd186c 100755 (executable)
@@ -3,13 +3,25 @@
 . ./.jprojects.sh
 
 for project in ${LIST}; do
+       if [ "${project}" = "jprojects-scripts" ]
+       then
+               echo "$0: Skipping jprojects-scripts ..."
+               continue
+       elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
+       then
+               echo "$0: Project '${project}' does not exist."
+               continue
+       fi
+
        echo "$0: Checking '${project}' ..."
-       cd "${project}"
+       cd "${JPROJECTS_HOME}/${project}"
        STATUS=`git status`
        UNTRACKED=`echo "${STATUS}" | grep "Untracked files:"`
        if [ -n "${UNTRACKED}" ]
        then
                echo "${STATUS}"
        fi
-       cd -
 done
+
+echo "$0: All done."
+exit 0