test: Add 1 and update 2 files
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
ARCH=$(uname -m)
|
||||
PARENT_DIR="$(dirname "${SCRIPT_DIR}")"
|
||||
|
||||
PREV_DIR=$(pwd)
|
||||
trap 'cd "$PREV_DIR"' EXIT
|
||||
|
||||
"$SCRIPT_DIR/output/dropshell.${ARCH}" hash "${SCRIPT_DIR}/test.sh"
|
||||
"$SCRIPT_DIR/output/dropshell.${ARCH}" help
|
||||
# The Docker build outputs to the parent directory's output folder
|
||||
DROPSHELL="${PARENT_DIR}/output/dropshell"
|
||||
|
||||
# Check if the binary exists
|
||||
if [ ! -f "$DROPSHELL" ]; then
|
||||
echo "Error: dropshell binary not found at $DROPSHELL"
|
||||
echo "Please run build.sh first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$DROPSHELL" hash "${SCRIPT_DIR}/test.sh"
|
||||
"$DROPSHELL" help
|
||||
|
||||
|
Reference in New Issue
Block a user