Skip to content

Instantly share code, notes, and snippets.

@en0
Last active April 23, 2025 03:21
Show Gist options
  • Save en0/4241f26ababf69cd1551d3cb92f9ccf8 to your computer and use it in GitHub Desktop.
Save en0/4241f26ababf69cd1551d3cb92f9ccf8 to your computer and use it in GitHub Desktop.
Update AUR.
#!/bin/bash
#!/bin/bash
for dir in */; do
cd "$dir" || continue
git_pull_output=$(git pull)
if [[ $git_pull_output == *"Already up to date."* ]]; then
echo "No updates for $dir"
else
echo "Updates available for $dir. Do you want to update the package? (yes/no)"
read -r user_input
if [[ $user_input == "yes" ]]; then
makepkg -sirc
fi
fi
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment