- if echo "$@" | grep -cq '\(\(\-\-help\)\|\(\-h\)\)'; then
- hostBuldScriptUsage ${0}
- fi
-
- if echo "$@" | grep -cq '\-\-skip-gyp'; then
- export SKIP_GYP=1
- fi
-
- if echo "$@" | grep -cq '\-\-skip-ninja'; then
- export SKIP_NINJA=1
- fi
-
- if echo "$@" | grep -cq '\-\-content_shell'; then
- export BUILD_CONTENT_SHELL=1
- fi
-
- if echo "$@" | grep -cq '\-\-ccache'; then
- export USE_CCACHE=1
- echo using ccache
- source $TOPDIR/build/ccache_env.sh ${1}
- fi
-
- if echo "$@" | grep -cq '\-\-build-ewk-unittests'; then
- export BUILD_EWK_UNITTESTS=1
- fi
- if echo "$@" | grep -cq '\-\-debug'; then
- export BUILD_SUBDIRECTORY=Debug
- fi
- # Will be empty string if -j not specified or ill-formatted, otherwise -j and the number argument together.
- # \grep because folks often alias grep but we want the vanilla behavior.
- export JOBS=$(echo "$@" | \grep -Eo '\-j\s*[1-9]([0-9]*)')