added some fixes and checks

This commit is contained in:
MunyDev 2024-08-12 17:03:13 -04:00
parent 6f6562f559
commit 6bd6a3a265
No known key found for this signature in database
GPG Key ID: 7DFBB51356064F62
4 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,6 @@
setup-venv:
python3 -m venv .venv
bash setup_venv.sh
exit
setup-python:
mkdir -p gen/python

View File

@ -1,6 +1,11 @@
#!/bin/bash
echo This script may be removed or disabled later with discretion of google.
if [ ! -d "$HOME"/.config/google-chrome/PKIMetadata ]
then
google-chrome chrome://components &> /dev/null &
exit 0
fi
# Search directory for versions
HIGHESTVERSIONAPPARENTLY=$(find "$HOME"/.config/google-chrome/PKIMetadata/ -maxdepth 1 -mindepth 1 -type d| head -n 1)

View File

@ -11,7 +11,7 @@ rm -rvf "${SCRIPT_DIR}"/out
mkdir "${SCRIPT_DIR}"/out
mkdir -p "${SCRIPT_DIR}"/out/PKIMetadata/2000/.
cp -rvf "${SCRIPT_DIR}"/original/PKIMetadata/2000/. "${SCRIPT_DIR}"/out/PKIMetadata/2000
rm -rvf "${SCRIPT_DIR}"out/PKIMetadata/2000/_metadata # verified contents not necessary
rm -rvf "${SCRIPT_DIR}"/out/PKIMetadata/2000/_metadata # verified contents not necessary
rm -rvf "${SCRIPT_DIR}out/PKIMetadata/2000/"*.fingerprint
python3 ./src/root_store_gen/generate_new_pbs.py "${SCRIPT_DIR}/original/PKIMetadata/2000/crs.pb" "$@" "${SCRIPT_DIR}/out/PKIMetadata/2000/crs.pb"
# Modify version in manifest
@ -26,5 +26,5 @@ dat = Path.read_text(mjs)
x = json.loads(dat)
x['version'] = "2000"
print(json.dumps(x))
mjs.write_text(json.dumps(x))
newfile.write_text(json.dumps(x))
EOF

3
setup_venv.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
source ./.venv/bin/activate
pip3 install protobuf