22 lines
483 B
Bash
Executable File
22 lines
483 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
PROJECT="$(basename "${SCRIPT_DIR}")"
|
|
|
|
rm -rf "${SCRIPT_DIR}/output"
|
|
mkdir -p "${SCRIPT_DIR}/output"
|
|
|
|
# Build dshash utility
|
|
cd "${SCRIPT_DIR}/dshash"
|
|
make clean
|
|
make
|
|
|
|
# Copy binary to output
|
|
cp "${SCRIPT_DIR}/dshash/dshash" "${SCRIPT_DIR}/output/dshash"
|
|
|
|
# Make sure it's executable
|
|
chmod +x "${SCRIPT_DIR}/output/dshash"
|
|
|
|
echo "Build complete: ${SCRIPT_DIR}/output/dshash" |