Skip to content

Commit aa55c63

Browse files
committed
docs: add environment reloading commands
1 parent c6a5745 commit aa55c63

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,33 @@ An example that installs llvm, cmake, ninja, ccache, and vcpkg:
5151
# windows example (open shell as admin)
5252
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp_windows.exe"
5353
./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
54+
55+
RefreshEnv.cmd # reload the environment
5456
```
5557

5658
```ps1
5759
# linux example
5860
wget "https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp_linux"
5961
chmod +x setup_cpp_linux
6062
sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
63+
64+
source ~/.profile # reload the environment
6165
```
6266

6367
```ps1
6468
# mac example
6569
wget "https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp_mac"
6670
chmod +x setup_cpp_mac
6771
sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
72+
73+
source ~/.profile # reload the environment
6874
```
6975

7076
NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-11.0.0`.
7177
For the tools, instead of `true` that chooses the default version, you can pass a specific version.
7278

79+
NOTE: you will not need `sudo` if you are already a root user (e.g., in a GitLab runner).
80+
7381
### With Nodejs
7482

7583
Download the `setup_cpp.js` file form [here](https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp.js), and run it with the available options.
@@ -82,13 +90,17 @@ Open the shell as admin, download via `curl`, then install
8290
# open shell as admin
8391
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp.js"
8492
node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
93+
94+
RefreshEnv.cmd # reload the environment
8595
```
8696

8797
On Linux or Mac:
8898

8999
```ps1
90100
wget "https://github.com/aminya/setup-cpp/releases/download/v0.5.3/setup_cpp.js"
91101
sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
102+
103+
source ~/.profile # reload the environment
92104
```
93105

94106
# Inside GitHub Actions
@@ -168,6 +180,9 @@ RUN chmod +x ./setup_cpp_linux
168180
# install llvm, cmake, ninja, and ccache
169181
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true
170182

183+
# reload the environment
184+
RUN source ~/.profile
185+
171186
ENTRYPOINT [ "/bin/sh" ]
172187
```
173188

building/docker/debian.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ RUN chmod +x ./setup_cpp_linux
1212
# install llvm, cmake, ninja, and ccache
1313
RUN ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true
1414

15+
# reload the environment
16+
CMD source ~/.profile
17+
1518
ENTRYPOINT [ "/bin/sh" ]

building/docker/debian_node.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ WORKDIR "/"
88
# run installation
99
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true
1010

11+
# reload the environment
12+
CMD source ~/.profile
13+
1114
ENTRYPOINT [ "/bin/sh" ]

building/docker/debian_node_slim.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ RUN apt-get install -y --no-install-recommends unzip
1212
# run installation
1313
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
1414

15+
# reload the environment
16+
CMD source ~/.profile
17+
1518
ENTRYPOINT [ "/bin/sh" ]

0 commit comments

Comments
 (0)