From c58b0d73436b1057efb8f396f1c0cf2dd120b4d5 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 1 Feb 2022 15:11:06 -0500 Subject: [PATCH] test --- topgrade.aliases | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/topgrade.aliases b/topgrade.aliases index baa28e4..e4529d5 100644 --- a/topgrade.aliases +++ b/topgrade.aliases @@ -1,5 +1,34 @@ # Run Topgrade without parameters, equivalent of being installed to PATH -topgrade_path="/opt/topgrade/topgrade" +#topgrade_path="/opt/topgrade/topgrade" topgrade_conf_path="/etc/topgrade" topgrade_conf_repo="https://git.deathbybandaid.net/deathbybandaid/topgrade.git" + +topgrade () +{ + if [ -f "$topgrade_path" ] ; then + "$topgrade_path" + else + echo "topgrade not found at $topgrade_path" + fi +} + +# 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" && echo "Pulled $topgrade_conf_path" + fi +} + +# System Updates Only +sysup () +{ + if [ -f "$topgrade_path" ] ; then + "$topgrade_path" --config $topgrade_conf_path/systemonly.toml + else + echo "topgrade not found at $topgrade_path" + fi +}