bash_aliases/topgrade.aliases
deathbybandaid 94259b17b5 test
2022-02-01 14:39:52 -05:00

20 lines
552 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"
alias topgrade='$topgrade_path'
# Use Configuration options from repo
topgrade-conf-pull ()
{
if [ -d "$topgrade_conf_path" ] ; then
echo "1"
git -C $topgrade_conf_path pull --quiet && echo "Pulled $topgrade_conf_path"
else
echo "2"
git clone --quiet "$topgrade_conf_repo" "$topgrade_conf_path"
fi
}