Skip to content

Commit

Permalink
Implement linux counterpart to manage.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rdelillo committed Sep 25, 2024
1 parent ee95a19 commit a10f0e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
}

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a10f0e5

Please sign in to comment.