35 lines
902 B
Plaintext
35 lines
902 B
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"
|
|
|
|
|
|
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
|
|
}
|
|
|
|
alias topgrade-conf-pull='topgrade_conf_pull'
|
|
|
|
# System Updates Only
|
|
alias sysup='topgrade --config $TOPGRADE_CONF_PATH/systemonly.toml'
|
|
|
|
# Template Repos
|
|
alias templategitup='topgrade --config $TOPGRADE_CONF_PATH/template_git.toml'
|