From a8b4576acbd2b7da0ae4fd723fba599f7bdddc7c Mon Sep 17 00:00:00 2001 From: Mark Bailey Date: Mon, 4 Nov 2024 12:58:55 -0500 Subject: [PATCH] chore: rename configure script to app --- bin/{configure => app} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename bin/{configure => app} (87%) diff --git a/bin/configure b/bin/app similarity index 87% rename from bin/configure rename to bin/app index 9cae53f..90074cb 100755 --- a/bin/configure +++ b/bin/app @@ -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