Skip to content

Instantly share code, notes, and snippets.

@pdubroy
Forked from dhconnelly/chromium-start.sh
Last active December 26, 2015 10:28
Show Gist options
  • Save pdubroy/7136525 to your computer and use it in GitHub Desktop.
Save pdubroy/7136525 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# Get depot_tools.
command -v gclient >/dev/null 2>&1 ||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
cat >> $HOME/.bashrc <<EOF
# Added by $(basename $0)
export PATH=$PWD/depot_tools:$PATH
EOF
export PATH=$PWD/depot_tools:$PATH
# Get Chromium
mkdir chromium
cd chromium
fetch chromium --nosvn=True
if [ `uname` == "Linux" ]; then
src/build/install-build-deps.sh
fi
# Set up some decent GYP defaults.
cat > chromium.gyp_env <<EOF
{
'GYP_DEFINES': 'component=shared_library clang=1 remove_webcore_debug_symbols=1',
'GYP_GENERATORS': 'ninja'
}
EOF
# Get/update Clang compiler.
cd src
tools/clang/scripts/update.sh
# Generate build files, etc.
gclient runhooks
# All done!
echo
echo $0 succeeded!
echo "Run \"ninja -C out/Debug chrome\" to build Chrome."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment