mirror of
https://github.com/CosmicScale/PSBBN-Definitive-English-Patch.git
synced 2025-02-14 03:49:12 +01:00
Added automatic repository update
This commit is contained in:
parent
453e28eced
commit
e6196a361e
19
01-Setup.sh
19
01-Setup.sh
@ -13,6 +13,25 @@ if [[ ! -f "${TOOLKIT_PATH}/helper/PFS Shell.elf" || ! -f "${TOOLKIT_PATH}/helpe
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fetch updates from the remote
|
||||||
|
git fetch > /dev/null 2>&1
|
||||||
|
|
||||||
|
# Check the current status of the repository
|
||||||
|
LOCAL=$(git rev-parse @)
|
||||||
|
REMOTE=$(git rev-parse @{u})
|
||||||
|
BASE=$(git merge-base @ @{u})
|
||||||
|
|
||||||
|
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||||
|
echo "The repository is up to date."
|
||||||
|
else
|
||||||
|
echo "Downloading update..."
|
||||||
|
git reset --hard && git pull --force > /dev/null 2>&1
|
||||||
|
echo
|
||||||
|
echo "The script has been updated to the latest version."
|
||||||
|
read -p "Press any key to exit, then run the script again."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo " _____ _ ";
|
echo " _____ _ ";
|
||||||
echo " / ___| | | ";
|
echo " / ___| | | ";
|
||||||
echo " \ \`--. ___| |_ _ _ _ __ ";
|
echo " \ \`--. ___| |_ _ _ _ __ ";
|
||||||
|
@ -16,12 +16,31 @@ if [[ ! -f "${TOOLKIT_PATH}/helper/PFS Shell.elf" || ! -f "${TOOLKIT_PATH}/helpe
|
|||||||
echo "Required helper files not found. Please make sure you are in the 'PSBBN-Definitive-English-Patch'"
|
echo "Required helper files not found. Please make sure you are in the 'PSBBN-Definitive-English-Patch'"
|
||||||
echo "directory and try again."
|
echo "directory and try again."
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "####################################################################">> "${INSTALL_LOG}";
|
||||||
|
date >> "${INSTALL_LOG}"
|
||||||
|
echo >> "${INSTALL_LOG}"
|
||||||
|
echo "Path set to: $TOOLKIT_PATH" >> "${INSTALL_LOG}"
|
||||||
|
echo "Helper files found." >> "${INSTALL_LOG}"
|
||||||
|
|
||||||
|
# Fetch updates from the remote
|
||||||
|
git fetch >> "${INSTALL_LOG}" 2>&1
|
||||||
|
|
||||||
|
# Check the current status of the repository
|
||||||
|
LOCAL=$(git rev-parse @)
|
||||||
|
REMOTE=$(git rev-parse @{u})
|
||||||
|
BASE=$(git merge-base @ @{u})
|
||||||
|
|
||||||
|
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||||
|
echo "The repository is up to date." >> "${INSTALL_LOG}"
|
||||||
else
|
else
|
||||||
echo "####################################################################">> "${INSTALL_LOG}";
|
echo "Downloading update..."
|
||||||
date >> "${INSTALL_LOG}"
|
git reset --hard && git pull --force >> "${INSTALL_LOG}" 2>&1
|
||||||
echo >> "${INSTALL_LOG}"
|
echo
|
||||||
echo "Path set to: $TOOLKIT_PATH" >> "${INSTALL_LOG}"
|
echo "The script has been updated to the latest version." | tee -a "${INSTALL_LOG}"
|
||||||
echo "Helper files found." >> "${INSTALL_LOG}"
|
read -p "Press any key to exit, then run the script again."
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Choose the PS2 storage device
|
# Choose the PS2 storage device
|
||||||
|
@ -26,15 +26,33 @@ if [[ ! -f "${TOOLKIT_PATH}/helper/PFS Shell.elf" || ! -f "${TOOLKIT_PATH}/helpe
|
|||||||
echo "Required helper files not found. Please make sure you are in the 'PSBBN-Definitive-English-Patch'"
|
echo "Required helper files not found. Please make sure you are in the 'PSBBN-Definitive-English-Patch'"
|
||||||
echo "directory and try again."
|
echo "directory and try again."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo "####################################################################">> "${LOG_FILE}";
|
|
||||||
date >> "${LOG_FILE}"
|
|
||||||
echo >> "${LOG_FILE}"
|
|
||||||
echo "Path set to: $TOOLKIT_PATH" >> "${LOG_FILE}"
|
|
||||||
echo "Helper files found." >> "${LOG_FILE}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "####################################################################">> "${LOG_FILE}";
|
echo "####################################################################">> "${LOG_FILE}";
|
||||||
|
date >> "${LOG_FILE}"
|
||||||
|
echo >> "${LOG_FILE}"
|
||||||
|
echo "Path set to: $TOOLKIT_PATH" >> "${LOG_FILE}"
|
||||||
|
echo "Helper files found." >> "${LOG_FILE}"
|
||||||
|
|
||||||
|
# Fetch updates from the remote
|
||||||
|
git fetch >> "${LOG_FILE}" 2>&1
|
||||||
|
|
||||||
|
# Check the current status of the repository
|
||||||
|
LOCAL=$(git rev-parse @)
|
||||||
|
REMOTE=$(git rev-parse @{u})
|
||||||
|
BASE=$(git merge-base @ @{u})
|
||||||
|
|
||||||
|
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||||
|
echo "The repository is up to date." >> "${LOG_FILE}"
|
||||||
|
else
|
||||||
|
echo "Downloading update..."
|
||||||
|
git reset --hard && git pull --force >> "${LOG_FILE}" 2>&1
|
||||||
|
echo
|
||||||
|
echo "The script has been updated to the latest version." | tee -a "${LOG_FILE}"
|
||||||
|
read -p "Press any key to exit, set your custom game path if needed, and then run the script again."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo " _____ _____ _ _ _ ";
|
echo " _____ _____ _ _ _ ";
|
||||||
echo " | __ \ |_ _| | | | | | ";
|
echo " | __ \ |_ _| | | | | | ";
|
||||||
echo " | | \/ __ _ _ __ ___ ___ | | _ __ ___| |_ __ _| | | ___ ___ ";
|
echo " | | \/ __ _ _ __ ___ ___ | | _ __ ___| |_ __ _| | | ___ ___ ";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user