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 d16a54edd6.
This commit is contained in:
Manuel Schmid 2024-05-04 14:37:40 +02:00 committed by GitHub
parent d16a54edd6
commit c36e951781
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 33 additions and 1 deletions

View File

@ -1 +1,33 @@
#!/bin/bash ORIGINALDIR=/content/app # Use predefined DATADIR if it is defined [[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data # Make persistent dir from original dir function mklink () { mkdir -p $DATADIR/$1 ln -s $DATADIR/$1 $ORIGINALDIR } # Copy old files from import dir function import () { (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/) } cd $ORIGINALDIR # models mklink models # Copy original files (cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/) # Import old files import models # outputs mklink outputs # Import old files import outputs # Start application python launch.py $*
#!/bin/bash
ORIGINALDIR=/content/app
# Use predefined DATADIR if it is defined
[[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data
# Make persistent dir from original dir
function mklink () {
mkdir -p $DATADIR/$1
ln -s $DATADIR/$1 $ORIGINALDIR
}
# Copy old files from import dir
function import () {
(test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/)
}
cd $ORIGINALDIR
# models
mklink models
# Copy original files
(cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/)
# Import old files
import models
# outputs
mklink outputs
# Import old files
import outputs
# Start application
python launch.py $*