mirror of
https://github.com/CosmicScale/PSBBN-Definitive-English-Patch.git
synced 2025-03-10 10:17:51 +01:00
Skip update check gracefully if not a Git repository
This commit is contained in:
parent
4b6b97205e
commit
7d295eb836
@ -13,6 +13,10 @@ if [[ ! -f "${TOOLKIT_PATH}/helper/PFS Shell.elf" || ! -f "${TOOLKIT_PATH}/helpe
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if the current directory is a Git repository
|
||||||
|
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
||||||
|
echo "This is not a Git repository. Skipping update check."
|
||||||
|
else
|
||||||
# Fetch updates from the remote
|
# Fetch updates from the remote
|
||||||
git fetch > /dev/null 2>&1
|
git fetch > /dev/null 2>&1
|
||||||
|
|
||||||
@ -31,6 +35,7 @@ else
|
|||||||
read -p "Press any key to exit, then run the script again."
|
read -p "Press any key to exit, then run the script again."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo " _____ _ ";
|
echo " _____ _ ";
|
||||||
echo " / ___| | | ";
|
echo " / ___| | | ";
|
||||||
|
@ -18,12 +18,16 @@ if [[ ! -f "${TOOLKIT_PATH}/helper/PFS Shell.elf" || ! -f "${TOOLKIT_PATH}/helpe
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "####################################################################">> "${INSTALL_LOG}";
|
echo "########################################################################################################">> "${INSTALL_LOG}";
|
||||||
date >> "${INSTALL_LOG}"
|
date >> "${INSTALL_LOG}"
|
||||||
echo >> "${INSTALL_LOG}"
|
echo >> "${INSTALL_LOG}"
|
||||||
echo "Path set to: $TOOLKIT_PATH" >> "${INSTALL_LOG}"
|
echo "Path set to: $TOOLKIT_PATH" >> "${INSTALL_LOG}"
|
||||||
echo "Helper files found." >> "${INSTALL_LOG}"
|
echo "Helper files found." >> "${INSTALL_LOG}"
|
||||||
|
|
||||||
|
# Check if the current directory is a Git repository
|
||||||
|
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
||||||
|
echo "This is not a Git repository. Skipping update check." >> "${INSTALL_LOG}"
|
||||||
|
else
|
||||||
# Fetch updates from the remote
|
# Fetch updates from the remote
|
||||||
git fetch >> "${INSTALL_LOG}" 2>&1
|
git fetch >> "${INSTALL_LOG}" 2>&1
|
||||||
|
|
||||||
@ -42,6 +46,7 @@ else
|
|||||||
read -p "Press any key to exit, then run the script again."
|
read -p "Press any key to exit, then run the script again."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Choose the PS2 storage device
|
# Choose the PS2 storage device
|
||||||
while true; do
|
while true; do
|
||||||
|
@ -36,6 +36,10 @@ echo >> "${LOG_FILE}"
|
|||||||
echo "Path set to: $TOOLKIT_PATH" >> "${LOG_FILE}"
|
echo "Path set to: $TOOLKIT_PATH" >> "${LOG_FILE}"
|
||||||
echo "Helper files found." >> "${LOG_FILE}"
|
echo "Helper files found." >> "${LOG_FILE}"
|
||||||
|
|
||||||
|
# Check if the current directory is a Git repository
|
||||||
|
if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
|
||||||
|
echo "This is not a Git repository. Skipping update check." >> "${LOG_FILE}"
|
||||||
|
else
|
||||||
# Fetch updates from the remote
|
# Fetch updates from the remote
|
||||||
git fetch >> "${LOG_FILE}" 2>&1
|
git fetch >> "${LOG_FILE}" 2>&1
|
||||||
|
|
||||||
@ -54,6 +58,7 @@ else
|
|||||||
read -p "Press any key to exit, set your custom game path if needed, and then run the script again."
|
read -p "Press any key to exit, set your custom game path if needed, and then run the script again."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
function clean_up() {
|
function clean_up() {
|
||||||
echo | tee -a "${LOG_FILE}"
|
echo | tee -a "${LOG_FILE}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user