Skip to content

Commit 0a333d3

Browse files
author
Jason Mobarak
committed
Protect against running the script infinitely
1 parent fa0768c commit 0a333d3

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

stage_sysroot.bash

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,18 @@ stage_sysroot() {
2121
done
2222
}
2323

24-
docker run -i -t --rm \
25-
-v $PWD/example:/work/example \
26-
-v $PWD/build:/work/build \
27-
-v $PWD/output/opt:/opt \
28-
-v $PWD:/this_dir \
29-
arm-llvm-obf:base \
30-
/bin/bash -c ". /this_dir/stage_sysroot.bash; stage_sysroot"
24+
run() {
25+
26+
if [[ -n "$DOCKERCEPTION" ]]; then return; fi
27+
28+
docker run -i -t --rm \
29+
-v $PWD/example:/work/example \
30+
-v $PWD/build:/work/build \
31+
-v $PWD/output/opt:/opt \
32+
-v $PWD:/this_dir \
33+
-e DOCKERCEPTION=1 \
34+
arm-llvm-obf:base \
35+
/bin/bash -c ". /this_dir/stage_sysroot.bash; stage_sysroot"
36+
}
37+
38+
run

0 commit comments

Comments
 (0)