This commit is contained in:
deathbybandaid 2022-03-08 10:21:50 -05:00
parent b2b93be8c8
commit 3da938aa5c

View File

@ -1,16 +1,16 @@
# Run Topgrade without parameters, equivalent of being installed to PATH # 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_PATH="/etc/topgrade"
topgrade_conf_repo="https://git.deathbybandaid.net/deathbybandaid/topgrade.git" TOPGRADE_CONF_REPO="https://git.deathbybandaid.net/deathbybandaid/topgrade.git"
# Use Configuration options from repo # Use Configuration options from repo
topgrade_conf_pull () topgrade_conf_pull ()
{ {
if [[ -d "$topgrade_conf_path" ]] ; then if [[ -d "$TOPGRADE_CONF_PATH" ]] ; then
git -C $topgrade_conf_path pull --quiet && echo "Pulled $topgrade_conf_path" git -C $TOPGRADE_CONF_PATH pull --quiet && echo "Pulled $TOPGRADE_CONF_PATH"
else else
git clone --quiet "$topgrade_conf_repo" "$topgrade_conf_path" && echo "Pulled $topgrade_conf_path" git clone --quiet "$TOPGRADE_CONF_REPO" "$TOPGRADE_CONF_PATH" && echo "Pulled $TOPGRADE_CONF_PATH"
fi fi
} }
alias topgrade-conf-pull='topgrade_conf_pull' alias topgrade-conf-pull='topgrade_conf_pull'
@ -18,10 +18,10 @@ alias topgrade-conf-pull='topgrade_conf_pull'
#alias topgrade='$TOPGRADE_PATH' #alias topgrade='$TOPGRADE_PATH'
# System Updates Only # System Updates Only
alias sysup='$TOPGRADE_PATH --config $topgrade_conf_path/systemonly.toml' alias sysup='$TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/systemonly.toml'
# Template Repos # Template Repos
alias templategitup='$TOPGRADE_PATH --config $topgrade_conf_path/template_git.toml' alias templategitup='$TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/template_git.toml'
topgrade () topgrade ()
{ {
@ -36,7 +36,7 @@ topgrade ()
#sysup () #sysup ()
#{ #{
# if [[ -f "$TOPGRADE_PATH" ]] ; then # if [[ -f "$TOPGRADE_PATH" ]] ; then
# $TOPGRADE_PATH --config $topgrade_conf_path/systemonly.toml # $TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/systemonly.toml
# else # else
# echo "topgrade not found at $TOPGRADE_PATH" # echo "topgrade not found at $TOPGRADE_PATH"
# fi # fi