A script to fetch the most recent sourcebook data for PCGen.
This script updates and overwrites the data folder in PCGen with the most recent version from the PCGen Github but preserves any files you may have added in the homebrew or customsources subfolder. You should back those folders up just in case though.
Due to the process of downloading the entire PCGen repo as a step in this script, it does take a good few minutes to run. If I figure out how to speed it up in the future, I'll update the scripts.
- Windows - 7za.exe - Portable 7zip to use for scripting. The link to this binary can be found at https://www.7-zip.org/download.html (You're looking for the .7z file with the description "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager") Extract the
- Linux - Git, Rsync
- Download 7za.exe (see Dependecies) and place 7za.exe directly in your PCGen folder. (Link to 7za.exe above)
- Download the UpdateData.bat script file from here and also place it directly in your PCGen folder. (See Downloading files from Github below)
- Run UpdateData.bat
- Run UpdateData.bat again when needed.
- Download the UpdateData.sh script file from here and also place it directly in your PCGen folder. (See Downloading files from Github below)
- Make the sh file executable (chmod u+x UpdateData.sh)
- Run UpdateData.sh
- Run UpdateData.sh again when needed.
- Click on the file you want (UpdateData.bat or UpdateData.sh)
- Right-click on the Raw button, then left click on Save Link As or Save File As (depending on your browser)
- Save the file directly to your PCGen folder.
The script
- downloads the PCGen master repo into your pcgen folder (this is usually the slowest part of the script)
- copies the data folder from the repo it just downloaded to your pcgen folder. it will overwrite existing files with the same name but preserves files that do not appear in the repo (aka any homebrew you may have made)
- cleans up after itself, deleting the PCGen master repo from your system.
- Make sure the script (and 7za.exe if you're on Windows) are placed directly in your PCGen folder. If they are in a subfolder, the script will not run correctly.
- For Linux users, make sure that you have the appropriate permissions to run the script.
- For Linux users, use bash to run the script (bash UpdateData.sh)