fix deploy script to honor custom directory names
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 <noreply@anthropic.com>
This commit is contained in:
parent
9cf698c67d
commit
e9fc745d20
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user