BGforgeNet/Fallout2_Restoration_Project

rpu-install.sh update

Closed this issue · 4 comments

What happened

It would be more convienient if the install script would recursively rename the files and directories to lower case itself.

I forget how to try to submit code to an outside repository from my own. Here's my code. If you like it, then maybe you will want to use it to update your script:

#EDIT:
I just remembered that the directories need to be renamed before the zip is extracted over them. So this line of coe could be added into the linux and mac instruction if the present working directory is the game directory:
find . -depth -type d -name "*[A-Z]*" -execdir bash -c 'mv -v "$1" "$(dirname "$1")/$(basename "$1" | tr "[:upper:]" "[:lower:]")"' _ {} \;

Then the user should extract the files into the game directory like the instructions say.

Then this modified script could be ran, which changes the contents of everything within the present working directory, recursively, to lower case. Except for the two files AmmoGlovz.ini and AmmoYAAM.ini.

rpu-install.txt

I had to change the extension because github would not let me upload a shell script here.

I didn't test the part where it leaves the two files alone, because I renamed them manually before uploading this. I added that part to the script because I was uploading this, and figured that the script should leave those two files alone.

It would be more convienient if the install script would recursively rename the files and directories to lower case itself.

It might, but it risks overwriting some files, and it needs to be tested on different OS as wel..

If you want to add an optional argument to the script to do the lowercasing, that would be fine I guess.
Otherwise, I don't want to do non-transparent changes.