nansi

A CLI tool to filter ansi escape sequences and format text streams.


nansi

/

build.sh

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/env bash
set -e

BUILD_TYPE="release"

if [[ $# > 0 ]]; then
  if [[ $1 == "--debug" ]]; then
    BUILD_TYPE="debug"
  elif [[ $1 == "--release" ]]; then
    BUILD_TYPE="release"
  else
    printf "usage: ./build.sh [-d|-r]\n";
    exit 1
  fi
fi

# source environment variables
source ./env.sh

printf "\nBuilding ${APP} in ${BUILD_TYPE} mode\n"

printf "\nCompiling ${APP}\n"
mkdir -p build/${BUILD_TYPE}
cd build/${BUILD_TYPE}
cmake ../../ -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
time make
Back to Top