• On Windows, you must install Git Bash to be able to use the following script and the Git commands. • The git status command in the following script must be in a single line. Ensure that there are no line breaks in the git status command. This is applicable to both Linux and Windows. ![]() |
#!/usr/bin/env bash
#git config changes
git config core.fileMode false
git config --global core.autocrlf false
git config --global core.whitespace cr-at-eol
# delete the old reports Directory and Create new
rm -rf CustomizationReport
mkdir CustomizationReport
echo -e "List of files found to be changed/Customized:\n\n" > CustomizationReport/Report.txt
#Pull the latest git status
git status -v | grep -v "PAAgent" | grep -v "Log" | grep -v "Derby" | grep -v "InS_SW/SW/System/Java" | grep -v "InS_SW/Config/Applications/ContentManager/Work/" | grep -v
"InS_SW/Config/System/Config/customizedContext_3.conf.xml" | grep -v "InS_SW/Config/System/Config/SiteInfo.conf.xml" | grep -v "InS_SW/Config/Applications/DataProcess/Config/Common/Templates/IMANIntegration/IMANConfig.xml" | grep -v
"InS_SW/Config/Applications/DataProcess/Config/Common/Templates/OrgNameMapping/orgname-mapping.xml" | grep -v
"InS_SW/Config/Applications/ContentManager/Config/Common/Templates/TAL/TALNotification/mailConfig.xml" | grep -v
"InS_SW/Config/System/Config/sitesDescriptor.xml" | grep -v
"InS_SW/Config/System/Config/PublicationsList.xml" | grep -v
"InS_SW/Config/System/Config/ProfileDefinitions.xml" | grep -v
"InS_SW/SW/Applications/Windchill.ear/.xconf-target-file-hints" | grep -v
"InS_SW/SW/Applications/Windchill.ear/bin/adminTools/sip/store/sip.keystore" | grep -v
"InS_SW/SW/System/WildFly/standalone/configuration/standalone-full.xml" | grep -v
"InS_SW/SW/System/WildFly/standalone/configuration/ins.keystore" | grep -v
"InS_SW/SW/System/WildFly/standalone/configuration/VAULT.dat" | | grep -v ".*\.bak$" | grep -v
"InS_SW/SW/coreCMIServer.properties" | grep -v "InS_SW/SW/coreServer.properties" | grep -v
"InS_SW/Config/Titles" | grep -v "InS_SW/SW/System/OCU" | grep -v
"InS_SW/SW/3C.properties" | grep -v "InS_SW/SW/System/Core" | grep -v
"InS_SW/SW/System/Tools" | grep -v "standalone_xml_history" | grep -v
".*\.BACKUP$" | grep -v ".*\.jar$" | grep -v "coreCMIPublications.xml" | grep -v
"corePublications.xml" | grep -v "serverCMICfg.xml" | grep -v
"Datasources.conf.xml" | grep -v "Namespaces.conf.xml" | grep -v
"titles.conf.xml" | grep -v ".*\.gitignore$" | grep -v "CustomizationReport"
| grep -v "main-min.js" | grep -v ".*\.deployed$" | grep -v
".*\.pid$" | grep -v ".*\.dodeploy$" | grep -v "SCI" | grep -v
"xconf-backup" | grep -v ".*\.class$" | grep -v "CustomizationStatus"
| grep -v ".*\.exe$" | grep -v ".*\.log$" | grep -v
"InS_SW/SW/System/WildFly/standalone/data" | grep -v "InS_SW/SW/System/BLCache/" | grep -v "InS_SW/SW/System/Licenses" | grep -v "installer"| grep -v ".*\.ootb$" | grep -v
"*_OOTB" | grep -v "*_bkp" | grep -v "*_backup" >> CustomizationReport/Report.txt
#Sanitization
grep -v 'Changes not staged for commit:' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
grep -v '(use "git add/rm <file>..." to update what will be committed)' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
grep -v '(use "git add <file>..." to include in what will be committed)' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
grep -v '(use "git restore <file>..." to discard changes in working directory)' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
grep -v 'no changes added to commit (use "git add" and/or "git commit -a")' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
grep -v '(use "git checkout -- <file>..." to discard changes in working directory)' CustomizationReport/Report.txt > CustomizationReport/temp && mv CustomizationReport/temp CustomizationReport/Report.txt
# Pull separate git diff report for each file found to be changed.
grep 'modified:' CustomizationReport/Report.txt | sed 's/^.*: //' | while read -r line ; do
echo "Processing $line"
git diff $line > CustomizationReport/customReport-$(basename -- "$line").txt
done