netcaptain/build.sh

16 lines
380 B
Bash
Executable File

#!/bin/bash
set -e
# Keep track of the last command executed
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# Echo an error message before exiting
trap 'echo "\"${last_command}\" command finished with exit code $?."' EXIT
# Build chroniclerd binary
cd cmd/ncpt
go build -o ncpt
if [ ! -d ../../build ]; then
mkdir ../../build
fi
mv ncpt ../../build