44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
|
|
# 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"
|
|
|
|
# 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
|
|
}
|
|
alias topgrade-conf-pull='topgrade_conf_pull'
|
|
|
|
#alias topgrade='$TOPGRADE_PATH'
|
|
|
|
# System Updates Only
|
|
alias sysup='$TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/systemonly.toml'
|
|
|
|
# Template Repos
|
|
alias templategitup='$TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/template_git.toml'
|
|
|
|
topgrade ()
|
|
{
|
|
if [[ -f "$TOPGRADE_PATH" ]] ; then
|
|
$TOPGRADE_PATH
|
|
else
|
|
echo "topgrade not found at $TOPGRADE_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
|
|
#}
|