File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -158,9 +158,11 @@ is_s3_storage
158158is_s3_storage_flag=$? # 0 if S3 storage, 1 if Git
159159
160160if [ " $is_s3_storage_flag " -eq 0 ]; then
161+ export IS_GIT_PROJECT=false
161162 export SMUS_PROJECT_DIR=" $HOME /shared"
162163 echo " Project is using S3 storage, project directory set to: $SMUS_PROJECT_DIR "
163164else
165+ export IS_GIT_PROJECT=true
164166 export SMUS_PROJECT_DIR=" $HOME /src"
165167 echo " Project is using Git storage, project directory set to: $SMUS_PROJECT_DIR "
166168fi
@@ -173,9 +175,14 @@ else
173175fi
174176
175177# Write SMUS_PROJECT_DIR to a JSON file to be accessed by JupyterLab Extensions
178+ mkdir -p " $HOME /.config" # Create config directory if it doesn't exist
176179jq -n \
177180 --arg smusProjectDirectory " $SMUS_PROJECT_DIR " \
178- ' { smusProjectDirectory: $smusProjectDirectory }' > $HOME /.config/smus-storage-metadata.json
181+ --arg isGitProject " $IS_GIT_PROJECT " \
182+ ' {
183+ smusProjectDirectory: $smusProjectDirectory,
184+ isGitProject: ($isGitProject == "true")
185+ }' > " $HOME /.config/smus-storage-metadata.json"
179186
180187if [ $is_s3_storage_flag -ne 0 ]; then
181188 # Creating a directory where the repository will be cloned
Original file line number Diff line number Diff line change @@ -158,9 +158,11 @@ is_s3_storage
158158is_s3_storage_flag=$? # 0 if S3 storage, 1 if Git
159159
160160if [ " $is_s3_storage_flag " -eq 0 ]; then
161+ export IS_GIT_PROJECT=false
161162 export SMUS_PROJECT_DIR=" $HOME /shared"
162163 echo " Project is using S3 storage, project directory set to: $SMUS_PROJECT_DIR "
163164else
165+ export IS_GIT_PROJECT=true
164166 export SMUS_PROJECT_DIR=" $HOME /src"
165167 echo " Project is using Git storage, project directory set to: $SMUS_PROJECT_DIR "
166168fi
@@ -173,9 +175,14 @@ else
173175fi
174176
175177# Write SMUS_PROJECT_DIR to a JSON file to be accessed by JupyterLab Extensions
178+ mkdir -p " $HOME /.config" # Create config directory if it doesn't exist
176179jq -n \
177180 --arg smusProjectDirectory " $SMUS_PROJECT_DIR " \
178- ' { smusProjectDirectory: $smusProjectDirectory }' > $HOME /.config/smus-storage-metadata.json
181+ --arg isGitProject " $IS_GIT_PROJECT " \
182+ ' {
183+ smusProjectDirectory: $smusProjectDirectory,
184+ isGitProject: ($isGitProject == "true")
185+ }' > " $HOME /.config/smus-storage-metadata.json"
179186
180187if [ $is_s3_storage_flag -ne 0 ]; then
181188 # Creating a directory where the repository will be cloned
You can’t perform that action at this time.
0 commit comments