fix create_out pulling the older PKIMetadata instead of the new one

Signed-off-by: kxtzownsu <kxtzownsu@gmail.com>
This commit is contained in:
kxtzownsu 2025-03-21 02:28:17 -04:00
parent f51782d316
commit 8d49e75a0b

View File

@ -21,29 +21,31 @@ then
"$CHROME" chrome://components # &> /dev/null & "$CHROME" chrome://components # &> /dev/null &
exit 0 exit 0
fi fi
HIGHESTVERSIONAPPARENTLY=$(find "$HOME/.config/$CHROME/PKIMetadata/" -maxdepth 1 -mindepth 1 -type d| head -n 1) HIGHESTVERSIONAPPARENTLY=$(find "$HOME/.config/$CHROME/PKIMetadata/" -maxdepth 1 -mindepth 1 -type d \
if [ -z ${HIGHESTVERSIONAPPARENTLY} ]; then | sort -V | tail -n 1)
echo "Failed to find PKIMetadata directory"
exit 1 if [ -z "$HIGHESTVERSIONAPPARENTLY" ]; then
echo "Failed to find PKIMetadata directory"
exit 1
fi fi
mkdir -p original/PKIMetadata/9999 mkdir -p "${SCRIPT_DIR}/../original/PKIMetadata/9999"
if [ "$HIGHESTVERSIONAPPARENTLY" != "" ]; then if [ "$HIGHESTVERSIONAPPARENTLY" != "" ]; then
cp -rvf "$HIGHESTVERSIONAPPARENTLY"/. original/PKIMetadata/9999 cp -rvf "$HIGHESTVERSIONAPPARENTLY"/. "${SCRIPT_DIR}/../original/PKIMetadata/9999"
else else
echo "Variable HIGHESTVERSIONAPPARENTLY returned empty, failing." echo "Variable HIGHESTVERSIONAPPARENTLY returned empty, failing."
exit 1 exit 1
fi fi
rm -rvf original/PKIMetadata/9999/_metadata #rm -rvf "${SCRIPT_DIR}/../original/PKIMetadata/9999/_metadata"
rm -rvf original/PKIMetadata/9999/manifest.fingerprint #rm -rvf "${SCRIPT_DIR}/../original/PKIMetadata/9999/manifest.fingerprint"
# Copy all directories, and will be modified by future calls # Copy all directories, and will be modified by future calls
rm -rvf "${SCRIPT_DIR}"/../out #rm -rvf "${SCRIPT_DIR}"/../out
mkdir "${SCRIPT_DIR}"/../out mkdir "${SCRIPT_DIR}"/../out
mkdir -p "${SCRIPT_DIR}"/../out/PKIMetadata/. mkdir -p "${SCRIPT_DIR}"/../out/PKIMetadata/.
cp -rvf "${SCRIPT_DIR}"/../original/PKIMetadata/9999/. "${SCRIPT_DIR}"/../out/PKIMetadata cp -rvf "${SCRIPT_DIR}"/../original/PKIMetadata/9999/. "${SCRIPT_DIR}"/../out/PKIMetadata
rm -rvf "${SCRIPT_DIR}"/../out/PKIMetadata/_metadata # verified contents not necessary #rm -rvf "${SCRIPT_DIR}"/../out/PKIMetadata/_metadata # verified contents not necessary
rm -rvf "${SCRIPT_DIR}/../out/PKIMetadata/"*.fingerprint #rm -rvf "${SCRIPT_DIR}/../out/PKIMetadata/"*.fingerprint
python3 ./src/root_store_gen/generate_new_pbs.py "${SCRIPT_DIR}/../original/PKIMetadata/9999/crs.pb" "$@" "${SCRIPT_DIR}/../out/PKIMetadata/crs.pb" python3 ./src/root_store_gen/generate_new_pbs.py "${SCRIPT_DIR}/../original/PKIMetadata/9999/crs.pb" "$@" "${SCRIPT_DIR}/../out/PKIMetadata/crs.pb"
# Modify version in manifest # Modify version in manifest