build.sh
author Ryan C. Gordon <icculus@icculus.org>
Sun, 18 Jun 2017 01:57:23 -0400
changeset 55 0aaf56a96d21
parent 23 a5c3269e6d99
permissions -rwxr-xr-x
Added initial code for producing time-based One Time Passwords.
icculus@23
     1
#!/bin/bash
robbie@21
     2
#
robbie@21
     3
# Need to install the following on Ubuntu 12.04:
robbie@21
     4
# - cmake
robbie@21
     5
# - libgtk2.0-dev
robbie@21
     6
# - libxtst-dev
robbie@21
     7
#
robbie@21
     8
# If you find other deps, add them here
robbie@21
     9
icculus@23
    10
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
icculus@23
    11
let NCPU=$NCPU+2
icculus@23
    12
echo "Will build with 'make -j$NCPU' ... please edit this script if incorrect."
icculus@23
    13
icculus@23
    14
set -x
icculus@23
    15
rm -rf cmake-build
icculus@23
    16
mkdir -p cmake-build
icculus@23
    17
cd $_
icculus@23
    18
cmake -DCMAKE_BUILD_TYPE=Release ..
icculus@23
    19
make -j$NCPU && cp -a 1pass ..
icculus@23
    20
cd ..
icculus@23
    21