mirror of
https://github.com/CosmicScale/PSBBN-Definitive-English-Patch.git
synced 2025-03-09 18:02:00 +01:00
Modified update process to update only changed files
This commit is contained in:
parent
ba4d1597c8
commit
04ca4400ff
29
01-Setup.sh
29
01-Setup.sh
@ -28,13 +28,28 @@ else
|
||||
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 -n 1 -s -r -p "Press any key to exit, then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
echo "Downloading updates..."
|
||||
# Get a list of files that have changed remotely
|
||||
UPDATED_FILES=$(git diff --name-only "$LOCAL" "$REMOTE")
|
||||
|
||||
if [ -n "$UPDATED_FILES" ]; then
|
||||
echo "Files updated in the remote repository:"
|
||||
echo "$UPDATED_FILES"
|
||||
|
||||
# Reset only the files that were updated remotely (discard local changes to them)
|
||||
echo "$UPDATED_FILES" | xargs git checkout --
|
||||
|
||||
# Pull the latest changes
|
||||
git pull --ff-only
|
||||
|
||||
echo
|
||||
echo "The script has been updated to the latest version."
|
||||
read -n 1 -s -r -p "Press any key to exit, then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
else
|
||||
echo "The repository is up to date."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -39,13 +39,27 @@ else
|
||||
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||
echo "The repository is up to date." | tee -a "${INSTALL_LOG}"
|
||||
else
|
||||
echo "Downloading update..."
|
||||
git reset --hard && git pull --force >> "${INSTALL_LOG}" 2>&1
|
||||
echo
|
||||
echo "The script has been updated to the latest version." | tee -a "${INSTALL_LOG}"
|
||||
read -n 1 -s -r -p "Press any key to exit, then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
echo "Downloading updates..."
|
||||
# Get a list of files that have changed remotely
|
||||
UPDATED_FILES=$(git diff --name-only "$LOCAL" "$REMOTE")
|
||||
|
||||
if [ -n "$UPDATED_FILES" ]; then
|
||||
echo "Files updated in the remote repository:" | tee -a "${INSTALL_LOG}"
|
||||
echo "$UPDATED_FILES" | tee -a "${INSTALL_LOG}"
|
||||
|
||||
# Reset only the files that were updated remotely (discard local changes to them)
|
||||
echo "$UPDATED_FILES" | xargs git checkout -- >> "${INSTALL_LOG}" 2>&1
|
||||
|
||||
# Pull the latest changes
|
||||
git pull --ff-only >> "${INSTALL_LOG}" 2>&1
|
||||
|
||||
echo "The script has been updated to the latest version." | tee -a "${INSTALL_LOG}"
|
||||
read -n 1 -s -r -p "Press any key to exit, then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
else
|
||||
echo "The repository is up to date." | tee -a "${INSTALL_LOG}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -64,13 +64,27 @@ else
|
||||
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||
echo "The repository is up to date." | tee -a "${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 -n 1 -s -r -p "Press any key to exit, set your custom game path if needed, and then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
echo "Downloading updates..."
|
||||
# Get a list of files that have changed remotely
|
||||
UPDATED_FILES=$(git diff --name-only "$LOCAL" "$REMOTE")
|
||||
|
||||
if [ -n "$UPDATED_FILES" ]; then
|
||||
echo "Files updated in the remote repository:" | tee -a "${LOG_FILE}"
|
||||
echo "$UPDATED_FILES" | tee -a "${LOG_FILE}"
|
||||
|
||||
# Reset only the files that were updated remotely (discard local changes to them)
|
||||
echo "$UPDATED_FILES" | xargs git checkout -- >> "${LOG_FILE}" 2>&1
|
||||
|
||||
# Pull the latest changes
|
||||
git pull --ff-only >> "${LOG_FILE}" 2>&1
|
||||
|
||||
echo "The script has been updated to the latest version." | tee -a "${LOG_FILE}"
|
||||
read -n 1 -s -r -p "Press any key to exit, set your custom game path if needed, and then run the script again."
|
||||
echo
|
||||
exit 0
|
||||
else
|
||||
echo "The repository is up to date." | tee -a "${LOG_FILE}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user