Analyzing 7.1 Customization
This section contains two parts:
Analyzing existing customization where the WTSafeArea mechanism was not in use.
Managing the custom files for future updates using the WTSafeArea mechanism.
1. Analyzing existing Customization 
To identify the files that were updated or customized after install in the current 7.x version, PTC Arbortext Content Delivery provides a simple shell script based on some git commands. The script generates the following output files:
report.txt—This file has list of all the files that are updated.
customReport-*.txt—For all the files that are updated in report.txt, a separate customReport-{file_name}.txt is generated with details about what has been changed in this file.
Perform the following steps to run this utility:
1. To identify all the files that are updated or customized on your existing 7.1.x.x environment, copy and paste the following script to a file and name the file as CustomizationStatus.sh.
* 
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
2. Save this file in the <INS_HOME>directory.
3. Run this script from the Git Bash using the ./CustomizationStatus.sh command.This generates a folder CustomizationReport in the same directory which contains the report.txt and customReport-{file_name}.txt containing details of the updates made to the files.
2. Managing Customization using WTSafeArea 
To customize a PTC Arbortext Content Delivery system it is often necessary to modify files released by PTC. Because these files can subsequently be updated by PTC in a maintenance release, you should have a strategy for managing your files so that your customizations are not lost when maintenance updates are installed.
As a general rule, the PTC Arbortext Content Delivery installer can overwrite any files that are in established PTC directories under the installation directory where the PTC Arbortext Content Delivery product is installed, regardless of their modification status. It is your responsibility to manage your customized files to avoid loss of your changes and, when updates are applied, to be able to easily identify PTC changes that affect the files you have modified.
PTC recommends that you manage customized files by creating a directory structure known as the safe area. The actual directory name is <ACD>/wtSafeArea. By using the wtSafeArea directory, you can store copies of the customized versions of PTC files where they will not be overwritten by the PTC Arbortext Content Delivery installer, as well as keep versions of the original PTC files.
The PTC Arbortext Content Delivery installer also uses this safe area to store updated files that correspond to your customized files. You can then compare the original files to those updated by PTC to identify where changes have been made. The comparison can assist you in incorporating PTC updates into your customized files. PTC provides a script to assist with managing and installing customized files into your system runtime locations within the /InS_SW installation directory.
Was this helpful?