BGforgeNet / Fallout2_Restoration_Project

Fallout 2 Restoration Project, updated
https://forums.bgforge.net/viewforum.php?f=39
542 stars 37 forks source link

rpu-install.sh update #214

Closed NuSynth closed 10 months ago

NuSynth commented 11 months ago

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

NuSynth commented 11 months ago

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

NuSynth commented 11 months ago

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.

burner1024 commented 11 months ago

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..

burner1024 commented 10 months ago

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.