prefer sh to bash in the docs

This commit is contained in:
Charles Kerr 2017-11-24 11:13:57 +01:00
parent c18afc924b
commit 1b0c1842ca
16 changed files with 87 additions and 81 deletions

View file

@ -16,7 +16,7 @@ Follow the guidelines below for building Electron on Linux.
On Ubuntu, install the following libraries:
```bash
```sh
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
libnotify-dev libgnome-keyring-dev libgconf2-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
@ -26,7 +26,7 @@ $ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
On RHEL / CentOS, install the following libraries:
```bash
```sh
$ sudo yum install clang dbus-devel gtk2-devel libnotify-devel \
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
@ -35,7 +35,7 @@ $ sudo yum install clang dbus-devel gtk2-devel libnotify-devel \
On Fedora, install the following libraries:
```bash
```sh
$ sudo dnf install clang dbus-devel gtk2-devel libnotify-devel \
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
@ -47,7 +47,7 @@ managers such as pacman. Or one can compile from source code.
## Getting the Code
```bash
```sh
$ git clone https://github.com/electron/electron
```
@ -58,7 +58,7 @@ the build project files. You must have Python 2.7.x for the script to succeed.
Downloading certain files can take a long time. Notice that we are using
`ninja` to build Electron so there is no `Makefile` generated.
```bash
```sh
$ cd electron
$ ./script/bootstrap.py --verbose
```
@ -68,14 +68,14 @@ $ ./script/bootstrap.py --verbose
If you want to build for an `arm` target you should also install the following
dependencies:
```bash
```sh
$ sudo apt-get install libc6-dev-armhf-cross linux-libc-dev-armhf-cross \
g++-arm-linux-gnueabihf
```
Similarly for `arm64`, install the following:
```bash
```sh
$ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
g++-aarch64-linux-gnu
```
@ -83,7 +83,7 @@ $ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
And to cross-compile for `arm` or `ia32` targets, you should pass the
`--target_arch` parameter to the `bootstrap.py` script:
```bash
```sh
$ ./script/bootstrap.py -v --target_arch=arm
```
@ -91,7 +91,7 @@ $ ./script/bootstrap.py -v --target_arch=arm
If you would like to build both `Release` and `Debug` targets:
```bash
```sh
$ ./script/build.py
```
@ -100,7 +100,7 @@ the directory `out/R`. The file size is in excess of 1.3 gigabytes. This
happens because the Release target binary contains debugging symbols.
To reduce the file size, run the `create-dist.py` script:
```bash
```sh
$ ./script/create-dist.py
```
@ -110,7 +110,7 @@ may want to remove the 1.3+ gigabyte binary which is still in `out/R`.
You can also build the `Debug` target only:
```bash
```sh
$ ./script/build.py -c D
```
@ -120,13 +120,13 @@ After building is done, you can find the `electron` debug binary under `out/D`.
To clean the build files:
```bash
```sh
$ npm run clean
```
To clean only `out` and `dist` directories:
```bash
```sh
$ npm run clean-build
```
@ -139,7 +139,7 @@ $ npm run clean-build
Prebuilt `clang` will try to link to `libtinfo.so.5`. Depending on the host
architecture, symlink to appropriate `libncurses`:
```bash
```sh
$ sudo ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
```
@ -161,19 +161,19 @@ To avoid using the prebuilt binaries of `libchromiumcontent`, you can build `lib
2. Install [additional build dependencies](https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md#Install-additional-build-dependencies)
3. Fetch the git submodules:
```bash
```sh
$ git submodule update --init --recursive
```
4. Pass the `--build_release_libcc` switch to `bootstrap.py` script:
```bash
```sh
$ ./script/bootstrap.py -v --build_release_libcc
```
Note that by default the `shared_library` configuration is not built, so you can
only build `Release` version of Electron if you use this mode:
```bash
```sh
$ ./script/build.py -c R
```
@ -188,7 +188,7 @@ in `<path>/bin/`.
For example if you installed `clang` under `/user/local/bin/clang`:
```bash
```sh
$ ./script/bootstrap.py -v --build_release_libcc --clang_dir /usr/local
$ ./script/build.py -c R
```
@ -201,7 +201,7 @@ variables to the ones you want.
For example building with GCC toolchain:
```bash
```sh
$ env CC=gcc CXX=g++ ./script/bootstrap.py -v --build_release_libcc --disable_clang
$ ./script/build.py -c R
```