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 " -s, --setup Setup the build environment and branch Unity" >&2
13 echo " -c, --clean Clean the build tree before building" >&2
18ARGS=`getopt -n$0 -u -a --longoptions="setup,clean,help" -o "sch" -- "$@"`
25 -s|--setup) SETUP=true;;
26 -c|--clean) CLEAN=true;;
36[ $# -eq 1 ] && BUILD_TYPE="$1"
38install_dependencies() {
39 sudo apt-get update || exit 4
40 echo "Installing Unity 8 dependencies.."
41 sudo apt-get install devscripts \
43 gsettings-desktop-schemas \
45 qtdeclarative5-dee-plugin \
46 qtdeclarative5-gsettings1.0 \
47 qtdeclarative5-ubuntu-ui-toolkit-plugin \
48 qtdeclarative5-ubuntu-settings-components \
49 unity-notifications-impl \
50 qtdeclarative5-xmllistmodel-plugin \
53 unity-lens-applications \
59 [ ! -f unity8-build-deps*deb -o $CODE_DIR/debian/control -nt unity8-build-deps*deb ] && mk-build-deps --install --root-cmd sudo $CODE_DIR/debian/control
62if [ -f "/usr/bin/ccache" ] ; then
63 if [ "x$CC" = "x" ]; then
64 export CC='ccache gcc'
66 if [ "x$CXX" = "x" ] ; then
67 export CXX='ccache g++'
71if [ -f "/usr/bin/ninja" ] ; then
73 # Ninja does not need -j, it parallelizes automatically.
77 BUILD_COMMAND="make -j$NUM_JOBS"
83 if $CLEAN; then rm -rf builddir; fi
87 cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
88 ${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