Replace pushd/popd with cd in scripts
Replace pushd/popd directory stack usage with plain cd in ct/gramps-web.sh and install/gramps-web-install.sh, and remove the >/dev/null redirections. The frontend build and backend migration steps remain functionally the same but use simpler directory changes to avoid relying on pushd/popd output suppression.
This commit is contained in:
parent
f1da768e02
commit
a1bcf8eb04
@ -85,22 +85,20 @@ function update_script() {
|
||||
msg_ok "Updated Gramps Web API"
|
||||
|
||||
msg_info "Updating Gramps Web Frontend"
|
||||
pushd /opt/gramps-web/frontend >/dev/null
|
||||
cd /opt/gramps-web/frontend
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
corepack enable
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
popd >/dev/null
|
||||
msg_ok "Updated Gramps Web Frontend"
|
||||
|
||||
msg_info "Applying Database Migration"
|
||||
pushd /opt/gramps-web-api >/dev/null
|
||||
cd /opt/gramps-web-api
|
||||
GRAMPS_API_CONFIG=/opt/gramps-web/config/config.cfg \
|
||||
ALEMBIC_CONFIG=/opt/gramps-web-api/alembic.ini \
|
||||
GRAMPSHOME=/opt/gramps-web/data/gramps \
|
||||
GRAMPS_DATABASE_PATH=/opt/gramps-web/data/gramps/grampsdb \
|
||||
$STD /opt/gramps-web/venv/bin/python3 -m gramps_webapi user migrate
|
||||
popd >/dev/null
|
||||
msg_ok "Applied Database Migration"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@ -88,20 +88,18 @@ $STD uv pip install --no-cache-dir --upgrade pip setuptools wheel
|
||||
$STD uv pip install --no-cache-dir gunicorn
|
||||
$STD uv pip install --no-cache-dir /opt/gramps-web-api
|
||||
|
||||
pushd /opt/gramps-web/frontend >/dev/null
|
||||
cd /opt/gramps-web/frontend
|
||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
corepack enable
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
popd >/dev/null
|
||||
|
||||
pushd /opt/gramps-web-api >/dev/null
|
||||
cd /opt/gramps-web-api
|
||||
GRAMPS_API_CONFIG=/opt/gramps-web/config/config.cfg \
|
||||
ALEMBIC_CONFIG=/opt/gramps-web-api/alembic.ini \
|
||||
GRAMPSHOME=/opt/gramps-web/data/gramps \
|
||||
GRAMPS_DATABASE_PATH=/opt/gramps-web/data/gramps/grampsdb \
|
||||
$STD /opt/gramps-web/venv/bin/python3 -m gramps_webapi user migrate
|
||||
popd >/dev/null
|
||||
msg_ok "Set up Gramps Web"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user