Skip to content

Commit d16a54e

Browse files
authored
fix: use LF as line breaks for Docker entrypoint.sh (#2843)
adjusted for Linux again, see lllyasviel/Fooocus#2836
1 parent e2f9bcb commit d16a54e

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

entrypoint.sh

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1 @@
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 $*
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 $*

0 commit comments

Comments
 (0)