# 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' 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 } # templategitup Updates Only templategitup () { if [[ -f "$TOPGRADE_PATH" ]] ; then $TOPGRADE_PATH --config $TOPGRADE_CONF_PATH/template_git.toml else echo "topgrade not found at $TOPGRADE_PATH" fi }