Implement linux counterpart to manage.sh

This commit is contained in:
robin 2024-09-25 17:52:46 -04:00
parent ee95a198aa
commit a10f0e5968

View file

@ -157,6 +157,7 @@ default_help() {
echo -e " ${BWhite}ruff-check${RST} ${BCyan}Run Ruff check for the repository${RST}"
echo -e " ${BWhite}ruff-fix${RST} ${BCyan}Run Ruff fix for the repository${RST}"
echo -e " ${BWhite}codespell${RST} ${BCyan}Run codespell check for the repository${RST}"
echo -e " ${BWhite}run${RST} ${BCyan}Run the repository${RST}"
echo ""
}
@ -175,6 +176,12 @@ run_codespell () {
"$POETRY_HOME/bin/poetry" run codespell
}
run_command () {
echo -e "${BIGreen}>>>${RST} Running ..."
shift; # will remove first arg ("run") from the "$@"
"$POETRY_HOME/bin/poetry" run "$@"
}
main () {
detect_python || return 1
@ -207,6 +214,10 @@ main () {
run_codespell || return_code=$?
exit $return_code
;;
"run")
run_command "$@" || return_code=$?
exit $return_code
;;
esac
if [ "$function_name" != "" ]; then