From e9fc745d20b8c6a368bd940e2439f6f5cd96ca6f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 6 Jan 2026 22:15:33 -0500 Subject: [PATCH] fix deploy script to honor custom directory names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The zip file contains 'jrunner/' as top-level directory, so unzipping always created /opt/jrunner regardless of custom path. Now the script renames the directory after unzipping if a custom name was specified. Example: ./deploy.sh /opt/jr_test Now correctly creates /opt/jr_test (not /opt/jrunner). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- deploy.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 45adb7f..f785ceb 100755 --- a/deploy.sh +++ b/deploy.sh @@ -27,7 +27,12 @@ if [ -d "${DEPLOY_DIR}" ]; then sudo rm -rf "${DEPLOY_DIR}" fi sudo mkdir -p "$(dirname "${DEPLOY_DIR}")" -sudo unzip jrunner/build/distributions/jrunner.zip -d "$(dirname "${DEPLOY_DIR}")" +sudo unzip -q jrunner/build/distributions/jrunner.zip -d "$(dirname "${DEPLOY_DIR}")" + +# Rename if custom directory name was specified +if [ "$(basename "${DEPLOY_DIR}")" != "jrunner" ]; then + sudo mv "$(dirname "${DEPLOY_DIR}")/jrunner" "${DEPLOY_DIR}" +fi # Only create symlink for default location if [ "${DEPLOY_DIR}" = "/opt/jrunner" ]; then