From 86d8ceee8e6b591d200c78b14f8dbf628cafbe17 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 8 Jul 2021 14:57:18 +0200 Subject: [PATCH] moved everything to ~/aur/ --- bin/aursync | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/bin/aursync b/bin/aursync index 519d8a1..b46fc45 100755 --- a/bin/aursync +++ b/bin/aursync @@ -1,13 +1,16 @@ #!/bin/bash -cd ~/custom-repo/x64_86 -repo-add -q custom.db.tar.gz *.pkg.* -if [[ "$#" -eq 1 ]] -then - aur sync --repo custom --root "$(pwd)" --no-view "$1" > /dev/null -fi -aur sync --repo custom --root "$(pwd)" --no-view -u > /dev/null -mv custom.db.tar.gz custom.db -mv custom.files.tar.gz custom.files -git add . -git commit -a -q -m "$(date +"%F %T")" -git push -q + +if [ -d "$HOME/aur/" ]; then + cd "$HOME/aur/custom-repo/x64_86" || exit + repo-add -q custom.db.tar.gz ./*.pkg.* + if [[ "$#" -eq 1 ]]; then + aur sync --repo custom --root "$(pwd)" --no-view -u "$1" >/dev/null + else + aur sync --repo custom --root "$(pwd)" --no-view -u >/dev/null + fi + mv custom.db.tar.gz custom.db + mv custom.files.tar.gz custom.files + git add . + git commit -a -q -m "$(date +"%F %T")" + git push -q +fi