Last active
January 12, 2024 16:43
-
-
Save RustyRaptor/22ae7eb0be85fad22647f81c36df3927 to your computer and use it in GitHub Desktop.
Update all AUR git repos in a folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Place this in the folder where you git clone AUR repos | |
# Make it executable and just run it in place. | |
# Doesn't always succeed you still need to monitor the output | |
# and fix things when they break. | |
for dir in */; do | |
echo "$dir" | |
cd "$dir" | |
git fetch | |
git stash | |
git clean -f -X | |
GITPULLOUTPUT=$(git pull) | |
UPDATEDTEXT=$(echo "Already up to date.") | |
if [ "$GITPULLOUTPUT" != "$UPDATEDTEXT" ] | |
then | |
echo "updating" | |
makepkg -si --noconfirm | |
fi | |
# Uncomment to run makepkg on all folders regardless | |
# makepkg -si --noconfirm | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment