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
158
158
is_s3_storage_flag=$? # 0 if S3 storage, 1 if Git
159
159
160
160
if [ " $is_s3_storage_flag " -eq 0 ]; then
161
+ export IS_GIT_PROJECT=false
161
162
export SMUS_PROJECT_DIR=" $HOME /shared"
162
163
echo " Project is using S3 storage, project directory set to: $SMUS_PROJECT_DIR "
163
164
else
165
+ export IS_GIT_PROJECT=true
164
166
export SMUS_PROJECT_DIR=" $HOME /src"
165
167
echo " Project is using Git storage, project directory set to: $SMUS_PROJECT_DIR "
166
168
fi
@@ -173,9 +175,14 @@ else
173
175
fi
174
176
175
177
# 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
176
179
jq -n \
177
180
--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"
179
186
180
187
if [ $is_s3_storage_flag -ne 0 ]; then
181
188
# 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
158
158
is_s3_storage_flag=$? # 0 if S3 storage, 1 if Git
159
159
160
160
if [ " $is_s3_storage_flag " -eq 0 ]; then
161
+ export IS_GIT_PROJECT=false
161
162
export SMUS_PROJECT_DIR=" $HOME /shared"
162
163
echo " Project is using S3 storage, project directory set to: $SMUS_PROJECT_DIR "
163
164
else
165
+ export IS_GIT_PROJECT=true
164
166
export SMUS_PROJECT_DIR=" $HOME /src"
165
167
echo " Project is using Git storage, project directory set to: $SMUS_PROJECT_DIR "
166
168
fi
@@ -173,9 +175,14 @@ else
173
175
fi
174
176
175
177
# 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
176
179
jq -n \
177
180
--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"
179
186
180
187
if [ $is_s3_storage_flag -ne 0 ]; then
181
188
# Creating a directory where the repository will be cloned
You can’t perform that action at this time.
0 commit comments