5NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
6CODE_DIR=$( dirname `readlink -f $0` )
9 echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
10 echo "Script to build the shell. If BUILD_TYPE is not specified, it defaults to \"debug\".\n" >&2
12 echo " -c, --clean Clean the build tree before building" >&2
17ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
24 -c|--clean) CLEAN=true;;
34[ $# -eq 1 ] && BUILD_TYPE="$1"
37 if [ ! -f control -o $CODE_DIR/debian/control -nt control ]; then
38 sed 's/\:native//g' $CODE_DIR/debian/control > control
39 mk-build-deps --install --root-cmd sudo control
43if [ -f "/usr/bin/ccache" ] ; then
44 if [ "x$CC" = "x" ]; then
45 export CC='ccache gcc'
47 if [ "x$CXX" = "x" ] ; then
48 export CXX='ccache g++'
52if [ -f "/usr/bin/ninja" ] ; then
54 # Ninja does not need -j, it parallelizes automatically.
58 BUILD_COMMAND="make -j$NUM_JOBS"
61if $CLEAN; then rm -rf builddir; fi
65cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
66${BUILD_COMMAND} || exit 7
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list