From 70080ae5ef93ff0f7da528f69bb2aad584af3a1f Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 1 Feb 2022 14:38:34 -0500 Subject: [PATCH] topgrade conf pull --- topgrade.aliases | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/topgrade.aliases b/topgrade.aliases index 5c0e1cc..f0fd9d1 100644 --- a/topgrade.aliases +++ b/topgrade.aliases @@ -2,5 +2,16 @@ # Run Topgrade without parameters, equivalent of being installed to PATH topgrade_path='/opt/topgrade/topgrade' topgrade_conf_path='/etc/topgrade' +topgrade_conf_repo="https://git.deathbybandaid.net/deathbybandaid/topgrade.git" alias topgrade='$topgrade_path' + +# Use Configuration options from repo +topgrade-conf-pull () +{ + if [ -d "$topgrade_conf_path" ] ; then + git -C $topgrade_conf_path pull --quiet && echo "Pulled $topgrade_conf_path" + else + git clone --quiet "$topgrade_conf_repo" "$topgrade_conf_path" + fi +}