Skip to content

Commit 58a81fb

Browse files
committed
requirements.txt is now optional
1 parent a904595 commit 58a81fb

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docker-dev.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ SCRIPT_DIR="$(cd "$SCRIPT_DIR"; pwd -P)"
2424
[ -f $SCRIPT_DIR/site.conf ] || die "site.conf not found. See site.conf.example"
2525
. $SCRIPT_DIR/site.conf
2626

27-
# requirements.txt is required
28-
[ -f $SCRIPT_DIR/requirements.txt ] || die "requirements.txt not found. See requirements.txt.example"
29-
30-
3127
# Figure out which md5 command to use
3228
if which md5sum >/dev/null; then
3329
MD5CMD=md5sum
@@ -66,7 +62,12 @@ HIST_FILE="$SCRIPT_DIR/.docker-dev-zsh_history"
6662
[[ "$1" == '-b' ]] && BUILD_IMAGE=y
6763
if [ -n "$BUILD_IMAGE" ]; then
6864
cd ${DD_HOME}
69-
ln -sf ../requirements.txt ./requirements.txt
65+
if [ -f $SCRIPT_DIR/requirements.txt ]; then
66+
ln -sf ../requirements.txt ./requirements.txt
67+
else
68+
rm -f ./requirements.txt
69+
touch ./requirements.txt
70+
fi
7071
ln -sf ../site.conf ./site.conf
7172
TARBALL="${SCRIPT_DIR}/.-docker-dev-build-tmp.tar.gz"
7273
rm -f ${TARBALL} || die "Error removing old context tarball"

0 commit comments

Comments
 (0)