nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

build.sh (690B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 HERE=`dirname $0`
      6 cd $HERE/..
      7 ROOT=`pwd`
      8 
      9 CFGFILE=${ROOT}/scripts/build.cfg
     10 
     11 if [ -e $CFGFILE ]; then
     12     . $CFGFILE
     13 fi
     14 
     15 FLATCC_BUILD_CMD=${FLATCC_BUILD_CMD:-ninja}
     16 
     17 mkdir -p ${ROOT}/bin
     18 mkdir -p ${ROOT}/lib
     19 
     20 rm -f ${ROOT}/bin/flatcc
     21 rm -f ${ROOT}/bin/flatcc_d
     22 rm -f ${ROOT}/libflatcc
     23 rm -f ${ROOT}/libflatcc_d.a
     24 rm -f ${ROOT}/libflatccrt.a
     25 rm -f ${ROOT}/libflatccrt_d.a
     26 
     27 if [ ! -d ${ROOT}/build/Debug ] || [ ! -d  ${ROOT}/build/Release ]; then
     28     ${ROOT}/scripts/initbuild.sh
     29 fi
     30 
     31 echo "building Debug" 1>&2
     32 cd ${ROOT}/build/Debug && $FLATCC_BUILD_CMD
     33 
     34 if [ "$1" != "--debug" ]; then
     35     echo "building Release" 1>&2
     36     cd ${ROOT}/build/Release && $FLATCC_BUILD_CMD
     37 fi