# Case Variant Analysis Scripts Case Variant Analysis Scripts automate the process of analyzing case variants in a Perforce (p4) Software Development Platform (SDP) environment. The scripts help highlight clashes in files and directories resulting from case-sensitive naming conventions. Additionally, they provide potential solutions to solve these issues. ## Scripts ### 1. `acv.sh` (Bash Script) #### Description This script manages the entire case variant analysis process. It compiles a list of all the files along with their details. It also identifies the duplicates and, using the ClashFinder scripts, presents these results in log files. #### Usage To use this script, you should run: ```bash chmod +x acv.sh cd /p4/common/site/cic_blue nohup ./acv.sh < /dev/null > acv.extra.log 2>&1 & ``` ### 2. `FindCaseClashAction.py` (Python Script) #### Description This script scrutinizes the identified clashes and suggests a course of action for each one. #### Input and Output - Input: `filedups.txt` - Output: `clashes.txt` ### 3. `FindCaseClash.py` (Python Script) #### Description This script detects case-sensitive file path clashes. #### Input and Output - Input: `filedups.txt` - Output: `dups.txt` ## Set-Up ### Prerequisites System requirements: - Python 3.x - The Perforce Command-Line Interface (CLI) - Python P4 package ### Instructions #### Installation 1. Set up a directory in SDP: `mkdir -p /p4/common/site/cic_blue` 2. Clone this repository. 3. Navigate to the new directory: `cd /p4/common/site/cic_blue` 4. Download the required files: `wget https://swarm.workshop.perforce.com/archives/cic/main.zip` 5. Unzip files `unzip -j main.zip -d /p4/common/site/cic_blue` 6. Install the required Python packages: `pip install -r requirements.txt` 7. Ensure `acv.sh` is executable: `chmod +x acv.sh` #### Execution To run the `acv.sh` script, you should use the following command: `nohup ./acv.sh < /dev/null > acv.extra.log 2>&1 &`. The output will be saved into the `acv.extra.log` file. ## Logs You can find the logs generated for each run in the `/p4/common/site/cic_blue/run` directory, under the specific log file: `log`. ## Troubleshooting In case of errors: - Investigate the log files for further details. - Make sure all scripts can be executed. - Check installation of all Python dependencies. Remember: These scripts are designed for the SDP environment. If you are using a different setup, you might need to make some adjustments. It's recommended to back up your data before making any changes suggested by these scripts. ## Dependencies - Python 3.x - Perforce CLI (`p4`) - Python P4 package. === requirements.txt === P4==0.1.5