Skip to content

Commit e94469f

Browse files
committed
Add a new init script
1 parent ccf3808 commit e94469f

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

sspcloud/download_notebook.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
echo "Executing the download_notebook.sh script"
3+
4+
# Retrieve the website URL
5+
cd $MY_REPO
6+
export GITHUB_OWNER=$(git remote get-url origin | sed -E 's/.*github.com[:\/]([^\/]+)\/.*/\1/')
7+
export GH_PAGES_WEBSITE="https://${GITHUB_OWNER}.github.io/${MY_REPO}"
8+
cd ..
9+
10+
echo $GH_PAGES_WEBSITE
11+
12+
# Define the URL of the notebook
13+
NOTEBOOK_DOWNLOAD_URL="${GH_PAGES_WEBSITE}/${NOTEBOOK_PATH}"
14+
15+
echo $NOTEBOOK_DOWNLOAD_URL
16+
17+
# Download the notebook directly using curl
18+
WORK_DIR="/home/onyxia/work"
19+
echo $NOTEBOOK_DOWNLOAD_URL
20+
curl -L $NOTEBOOK_DOWNLOAD_URL -o "${WORK_DIR}/exercise.ipynb"

sspcloud/init-trainees.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sh $MY_REPO/sspcloud/restore_environment.sh
1010
sh $MY_REPO/sspcloud/download_data.sh
1111

1212
# Download the notebook
13+
export NOTEBOOK_PATH=$1
1314
sh $MY_REPO/sspcloud/download_notebook.sh
1415

1516
# Ensure Quarto extension is up to date

0 commit comments

Comments
 (0)