Skip to content

Commit c36e951

Browse files
authored
Revert "fix: use LF as line breaks for Docker entrypoint.sh (#2843)" (#2865)
False alarm, worked as intended before. Sorry for the fuzz. This reverts commit d16a54e.
1 parent d16a54e commit c36e951

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

entrypoint.sh

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
#!/bin/bashORIGINALDIR=/content/app# Use predefined DATADIR if it is defined[[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data# Make persistent dir from original dirfunction mklink () { mkdir -p $DATADIR/$1 ln -s $DATADIR/$1 $ORIGINALDIR}# Copy old files from import dirfunction import () { (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/)}cd $ORIGINALDIR# modelsmklink models# Copy original files(cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/)# Import old filesimport models# outputsmklink outputs# Import old filesimport outputs# Start applicationpython launch.py $*
1+
#!/bin/bash
2+
3+
ORIGINALDIR=/content/app
4+
# Use predefined DATADIR if it is defined
5+
[[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data
6+
7+
# Make persistent dir from original dir
8+
function mklink () {
9+
mkdir -p $DATADIR/$1
10+
ln -s $DATADIR/$1 $ORIGINALDIR
11+
}
12+
13+
# Copy old files from import dir
14+
function import () {
15+
(test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/)
16+
}
17+
18+
cd $ORIGINALDIR
19+
20+
# models
21+
mklink models
22+
# Copy original files
23+
(cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/)
24+
# Import old files
25+
import models
26+
27+
# outputs
28+
mklink outputs
29+
# Import old files
30+
import outputs
31+
32+
# Start application
33+
python launch.py $*

0 commit comments

Comments
 (0)