exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

bootstrap (2105B)


      1 #!/bin/sh
      2 # This file is in the public domain.
      3 
      4 set -eu
      5 
      6 if ! git --version >/dev/null; then
      7   echo "git not installed"
      8   exit 1
      9 fi
     10 
     11 # Make sure that "git pull" et al. also update
     12 # submodules to avoid accidental rollbacks.
     13 git config --local submodule.recurse true
     14 
     15 echo "$0: Updating submodules"
     16 # Caution: We do NOT want to fetch the latest version with --remote,
     17 # but instead always the one that's recorded in the repository.
     18 echo | git submodule update --init --force
     19 
     20 ./contrib/check-prebuilt
     21 
     22 # This is more portable than `which' but comes with
     23 # the caveat of not(?) properly working on busybox's ash:
     24 existence()
     25 {
     26     command -v "$1" >/dev/null 2>&1
     27 }
     28 
     29 
     30 if existence uncrustify; then
     31     echo "Installing uncrustify hook and configuration"
     32     # Install uncrustify format symlink (if possible)
     33     ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null || true
     34     # Install pre-commit hook (if possible)
     35     ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null || true
     36 else
     37     echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development"
     38 fi
     39 
     40 
     41 # Generate Makefile.am in contrib/
     42 cd contrib
     43 rm -f Makefile.am
     44 echo 'dist_amlspapkgdata_DATA = \' > Makefile.am.ext
     45 find wallet-core/aml-backoffice/ -type f | sort | awk '{print "  " $1 " \\" }' >> Makefile.am.ext
     46 # Remove extra '\' at the end of the file
     47 truncate -s -2 Makefile.am.ext
     48 
     49 echo "" >> Makefile.am.ext
     50 echo 'dist_kycspapkgdata_DATA = \' >> Makefile.am.ext
     51 find wallet-core/kyc/ -type f | sort | awk '{print "  " $1 " \\" }' >> Makefile.am.ext
     52 # Remove extra '\' at the end of the file
     53 truncate -s -2 Makefile.am.ext
     54 
     55 echo "" >> Makefile.am.ext
     56 echo 'dist_auditorspapkgdata_DATA = \' >> Makefile.am.ext
     57 find wallet-core/auditor-backoffice/ -type f | sort | awk '{print "  " $1 " \\" }' >> Makefile.am.ext
     58 # Remove extra '\' at the end of the file
     59 truncate -s -2 Makefile.am.ext
     60 
     61 
     62 cat Makefile.am.in Makefile.am.ext >> Makefile.am
     63 # Prevent accidental editing of the generated Makefile.am
     64 chmod -w Makefile.am
     65 cd ..
     66 
     67 echo "$0: Running autoreconf"
     68 autoreconf -fi