33 lines
700 B
Bash
Executable File
33 lines
700 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
|
|
TEMP_DIR=$(mktemp -d)
|
|
SOS="${TEMP_DIR}/sos"
|
|
|
|
curl -L -o "${SOS}" https://getbin.xyz/sos
|
|
chmod +x "${SOS}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# make canonical path
|
|
DROPSHELL_BUILD_DIR=$(realpath "${DROPSHELL_BUILD_DIR}")
|
|
|
|
# make sure the build script exists
|
|
if [ ! -f "${DROPSHELL_BUILD_DIR}/dropshell-build" ]; then
|
|
echo "Error: dropshell-build not found"
|
|
exit 1
|
|
fi
|
|
if [ ! -f "${DROPSHELL_BUILD_DIR}/install_dropshell_build_requirements" ]; then
|
|
echo "Error: install_dropshell_build_requirements not found"
|
|
exit 1
|
|
fi
|
|
|
|
# run the build script
|
|
"${DROPSHELL_BUILD_DIR}/dropshell-build" -m -r "${SCRIPT_DIR}"
|