chore: rename configure script to app

This commit is contained in:
Mark Bailey 2024-11-04 12:58:55 -05:00
parent f8c26830c9
commit a8b4576acb

View File

@ -2,7 +2,7 @@
set -euC
_activate_venv() {
. .venv/bin/activate
. .venv/bin/activate
}
_venv() {
@ -21,7 +21,7 @@ VENV_match=venv
_init() {
if [ -d .venv ]; then
_activate_venv
_activate_venv
pip install --upgrade pip
pip install -r requirements.txt
else
@ -32,7 +32,7 @@ INIT_match=init
_freeze() {
if [ -d .venv ]; then
_activate_venv
_activate_venv
mv requirements.txt requirements.txt.bak
pip freeze >requirements.txt
else
@ -66,7 +66,7 @@ _help() {
echo " help, -h: Show this help message"
echo " venv \${python_version}: Create virtual environment with \${python_version}"
echo " init \${python_version}: Initialize virtual environment with \${python_version} and install dependencies"
echo " start \${env(dev|prod):-dev} \${port:-8001} \${host:-0.0.0.0}: Start the application"
echo " start \${env(dev|prod):-dev} \${port:-8001} \${host:-0.0.0.0}: Start the application"
echo " freeze: Freeze dependencies"
}
@ -93,12 +93,11 @@ _main() {
case "$_cmd" in
--*) ;;
help | -h) _help ;;
"$START_match") _start "$@" ;;
"$START_match") _start "$@" ;;
"$VENV_match") _venv "$@" ;;
"$INIT_match")
_venv "$@"
shift
_init "$@"
_init
;;
"$FREEZE_match") _freeze ;;
esac