File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed
Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 1- #! /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 $*
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 $*
You can’t perform that action at this time.
0 commit comments