aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-09-03 00:58:13 +0200
committerpml68 <contact@pml68.dev>2025-09-03 00:58:13 +0200
commit04aa904df66ee05d08554e5a3e1e5e193633b289 (patch)
tree91843815ceffeb253abdb025e33e4593ef49fb2e
parentfeat: `set -eu` (diff)
downloadaur-04aa904df66ee05d08554e5a3e1e5e193633b289.tar.gz
fix: only run `git diff` when _update has pulled changes
-rwxr-xr-xaur4
1 files changed, 3 insertions, 1 deletions
diff --git a/aur b/aur
index af953c4..b63568f 100755
--- a/aur
+++ b/aur
@@ -22,12 +22,14 @@ _update() {
for dir in ~/.aur/*; do
cd "$dir" || continue
- if [[ $(git pull) != "Already up to date." ]] || [[ "${1-}" == "-f" ]] || [[ "$dir" == *-git && "${1-}" == "-g" ]]; then
+ if [[ $(git pull) != "Already up to date." ]]; then
git diff "@{1}.."
read -p "Proceed with installation? [Y/n] " proceed
if [[ -z "$proceed" ]] || [[ "$proceed" == "Y" ]] || [[ "$proceed" == "y" ]]; then
makepkg -si ; _clean
fi
+ elif [[ "${1-}" == "-f" ]] || [[ "$dir" == *-git && "${1-}" == "-g" ]]; then
+ makepkg -si ; _clean
fi
done
}