Skip to content

Commit 6d1c902

Browse files
authored
Merge pull request #10 from edmorley/dont-delete-build-dir
Don't delete the build directory root
2 parents 5485d38 + f531487 commit 6d1c902

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/compile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22
# bin/compile <build-dir> <cache-dir> <env-dir>
33

4+
# Ensure wildcards in globs match dotfiles too.
5+
shopt -s dotglob
6+
47
BUILD_DIR=${1:-}
58
CACHE_DIR=${2:-}
69
ENV_DIR=${3:-}
@@ -16,9 +19,7 @@ if [ -f $ENV_DIR/PROJECT_PATH ]; then
1619
echo " moving working dir: $PROJECT_PATH to $TMP_DIR"
1720
cp -R $BUILD_DIR/$PROJECT_PATH/. $TMP_DIR/
1821
echo " cleaning build dir $BUILD_DIR"
19-
rm -rf $BUILD_DIR
20-
echo " recreating $BUILD_DIR"
21-
mkdir -p $BUILD_DIR
22+
rm -rf $BUILD_DIR/*
2223
echo " copying preserved work dir from cache $TMP_DIR to build dir $BUILD_DIR"
2324
cp -R $TMP_DIR/. $BUILD_DIR/
2425
echo " cleaning tmp dir $TMP_DIR"

0 commit comments

Comments
 (0)