Skip to content

Commit 435d5f9

Browse files
authored
Merge pull request #46 from math-gout/master
2 parents 71e5845 + b57132f commit 435d5f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

toplevel_build/compile.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Build_Toplevel () {
8383

8484
# Save build
8585
cd ../../../..
86-
[[ ! -d $OUTPUT_DIR ]] && mkdir -p "$OUTPUT_DIR"
86+
[[ ! -d "$OUTPUT_DIR" ]] && mkdir -p "$OUTPUT_DIR"
8787
[[ -f builds/toplevel-$BUILD_VERSION.js ]] && rm -f "$OUTPUT_DIR/toplevel-$BUILD_VERSION.js"
8888
cp js_of_ocaml/_build/default/toplevel/examples/lwt_toplevel/toplevel.js "$OUTPUT_DIR/toplevel-$BUILD_VERSION.js"
8989
}
@@ -177,7 +177,7 @@ cp dune js_of_ocaml/toplevel/examples/lwt_toplevel/dune
177177

178178
if [[ " ${VERSIONS[@]} " =~ " all " ]]; then # Build all versions if "all" is set
179179
for BUILD_VERSION in "${SUPPORTED_OCAML_VERSIONS[@]}"; do
180-
if [[ -f builds/toplevel-$BUILD_VERSION.js && $OVERWRITE = false ]]; then
180+
if [[ -f "$OUTPUT_DIR/toplevel-$BUILD_VERSION.js" && $OVERWRITE = false ]]; then
181181
echo "Build $BUILD_VERSION already exists"
182182
else
183183
echo "Building version $BUILD_VERSION ..."
@@ -187,7 +187,7 @@ if [[ " ${VERSIONS[@]} " =~ " all " ]]; then # Build all versions if "all" is se
187187
done
188188
else # Build all versions in parameters
189189
for BUILD_VERSION in "${VERSIONS[@]}"; do
190-
if [[ -f builds/toplevel-$BUILD_VERSION.js && $OVERWRITE = false ]]; then
190+
if [[ -f "$OUTPUT_DIR/toplevel-$BUILD_VERSION.js" && $OVERWRITE = false ]]; then
191191
echo "Build $BUILD_VERSION already exists"
192192
else
193193
echo "Building version $BUILD_VERSION ..."

0 commit comments

Comments
 (0)