From 4a604203698bd1ea5f281c919045482b14b32d43 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Thu, 23 Jan 2020 20:03:40 +0100 Subject: [PATCH] Add automatic AUR repo fetch script --- .gitignore | 4 ++-- AUR/.gitignore | 4 ++++ AUR/update.sh | 12 ++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 AUR/.gitignore create mode 100755 AUR/update.sh diff --git a/.gitignore b/.gitignore index 0a0496b..b00754e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,9 +18,9 @@ !/.config/ !/.zsh/ +!/AUR/ +!/Wallpapers/ !/.gnupg/gpg-agent.conf !/.gnupg/gpg.conf !/.gnupg/sshcontrol - -!/Wallpapers/ diff --git a/AUR/.gitignore b/AUR/.gitignore new file mode 100644 index 0000000..38d6ba4 --- /dev/null +++ b/AUR/.gitignore @@ -0,0 +1,4 @@ +/* +/*/ +!/.gitignore +!/update.sh diff --git a/AUR/update.sh b/AUR/update.sh new file mode 100755 index 0000000..15ae9a2 --- /dev/null +++ b/AUR/update.sh @@ -0,0 +1,12 @@ +#!/bin/sh +for dir in *; do + if [ -d "${dir}" ]; then + cd ${dir} + git fetch --all + BEHIND=$(git rev-list HEAD...origin/master --count) + if [[ ! ${dir} -eq 0 ]]; then + echo "$(pwd) is ${BEHIND} commits behind" + fi + cd .. + fi +done