Skip to content

Commit

Permalink
fix new line
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Aug 14, 2024
1 parent 23f4904 commit 63bd9fa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sidecar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,20 @@ populate_notebook() {
filesize=$(echo $j | jq -r .file_size)

# Need to add a literal newline character that's why the quote is ending on next line
drs_pull="!gen3 drs-pull object $obj
"
drs_pull="!gen3 drs-pull object $obj"
# Need to add a literal newline character that's why the quote is ending on next line
jq --arg cmd "# File name: $filename - File size: $filesize
" '.cells[5].source += [$cmd]' "$FOLDER/data.ipynb" > "$FOLDER/data.tmp"
jq --arg cmd "# File name: $filename - File size: $filesize" '.cells[5].source += [$cmd]' "$FOLDER/data.ipynb" > "$FOLDER/data.tmp"
mv "$FOLDER/data.tmp" "$FOLDER/data.ipynb"

jq --arg cmd "$drs_pull" '.cells[5].source += [$cmd]' "$FOLDER/data.ipynb" > "$FOLDER/data.tmp"
mv "$FOLDER/data.tmp" "$FOLDER/data.ipynb"


done
log "Done populating notebook"
}

function populate() {
log "querying manifest service at $GEN3_ENDPOINT/manifests"
log "querying manifest service at $GEN3_ENDPOINT/manifests/"
MANIFEST=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests")
log "querying manifest service at $GEN3_ENDPOINT/metadata"
METADATA=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata")
Expand Down

0 comments on commit 63bd9fa

Please sign in to comment.