forked from Shinonome/dots-hyprland
now git pull working again
This commit is contained in:
+3
-3
@@ -58,7 +58,7 @@ if ! git fetch; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if there are any changes
|
# Check if there are any changes
|
||||||
if [[ $(git rev-list HEAD...origin/$current_branch --count) -eq 0 && 1 != 1 ]]; then
|
if [[ $(git rev-list HEAD...origin/$current_branch --count) -eq 0 ]]; then
|
||||||
echo "Repository is already up-to-date. Do not run git pull before this script. Exiting."
|
echo "Repository is already up-to-date. Do not run git pull before this script. Exiting."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -85,8 +85,8 @@ while IFS= read -r -d '' file; do
|
|||||||
done < <(find "${folders[@]}" -type f -print0)
|
done < <(find "${folders[@]}" -type f -print0)
|
||||||
|
|
||||||
|
|
||||||
echo "Modified files: ${modified_files[@]}"
|
|
||||||
echo "Excluded files and folders: ${excludes[@]}"
|
echo "Excluded files and folders: ${excludes[@]}"
|
||||||
|
echo
|
||||||
|
|
||||||
# Output all modified files
|
# Output all modified files
|
||||||
if [[ ${#modified_files[@]} -gt 0 ]]; then
|
if [[ ${#modified_files[@]} -gt 0 ]]; then
|
||||||
@@ -157,7 +157,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Then update the repository
|
# Then update the repository
|
||||||
if ! git pull; then
|
if git pull; then
|
||||||
echo "Git pull successful."
|
echo "Git pull successful."
|
||||||
else
|
else
|
||||||
# If the pull failed, clone the repository to a temporary folder and copy the files from there
|
# If the pull failed, clone the repository to a temporary folder and copy the files from there
|
||||||
|
|||||||
Reference in New Issue
Block a user