]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
Ignored genfiles.properties + added new script:
authorRoland Häder <roland@mxchange.org>
Mon, 22 Aug 2016 07:45:01 +0000 (09:45 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 22 Aug 2016 07:45:01 +0000 (09:45 +0200)
Signed-off-by: Roland Haeder <roland@haeder.net>
.gitignore
rm-jprojects.sh [new file with mode: 0644]

index c5bf3164c956f4b481accecd79f44acb5ff3ba30..93a93d8e3a60c96ed2fe18c7565f2bd460c984ed 100644 (file)
@@ -1,4 +1,5 @@
 /nbproject/private/
+/nbproject/genfiles.properties
 /nbproject/*~
 /manifest.mf
 /build/
diff --git a/rm-jprojects.sh b/rm-jprojects.sh
new file mode 100644 (file)
index 0000000..3614a68
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. ./.jprojects.sh || exit 255
+
+if [ -z "$1" ]
+then
+       echo "Usage $0 <file>"
+       exit 1
+fi
+
+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
+
+       cd "${JPROJECTS_HOME}/${project}" || exit 255
+
+       if [ -d "$1" ]
+       then
+               git rm -rf "$1"
+       elif [ -f "$1" ]
+       then
+               git rm -f "$1"
+       else
+               echo "$0: File/directory '$1' does not exist in '${project}."
+       fi
+done
+
+echo "$0: All done."
+exit 0