aboutsummaryrefslogtreecommitdiffstats
path: root/auto-void-packages/update-git-repo.sh
diff options
context:
space:
mode:
authorclyhtsuriva <aimeric@adjutor.xyz>2022-11-02 22:20:50 +0100
committerclyhtsuriva <aimeric@adjutor.xyz>2022-11-02 22:20:50 +0100
commit852a96b3cf69bb80773f926921c9d3f6b0101faf (patch)
tree05d6560368527f4a766511be02634eba74f708b3 /auto-void-packages/update-git-repo.sh
parent0685ff941978dab274ff24e095de5c6a9e1931bb (diff)
downloadscripts-852a96b3cf69bb80773f926921c9d3f6b0101faf.tar.gz
scripts-852a96b3cf69bb80773f926921c9d3f6b0101faf.tar.bz2
scripts-852a96b3cf69bb80773f926921c9d3f6b0101faf.zip
Adding scripts to semi-automate void-packages updates
Diffstat (limited to '')
-rwxr-xr-xauto-void-packages/update-git-repo.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/auto-void-packages/update-git-repo.sh b/auto-void-packages/update-git-repo.sh
new file mode 100755
index 0000000..e71701c
--- /dev/null
+++ b/auto-void-packages/update-git-repo.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+echo_n_notify(){
+ echo "$1" && notify-send "$1"
+}
+
+pushd "$HOME/workbench/void-packages" || exit 1
+CHECKOUT="checkout"
+FETCH="fetch"
+MERGE="merge"
+PUSH="push"
+
+git checkout master && \
+ echo_n_notify "$CHECKOUT: ok" && \
+ git fetch upstream && \
+ echo_n_notify "$FETCH: ok" && \
+ git merge upstream/master && \
+ echo_n_notify "$MERGE: ok" && \
+ git push && \
+ echo_n_notify "$PUSH: ok"
+
+./xbps-src bootstrap-update
+
+popd || exit 1