Skip to content

Commit e9adf06

Browse files
committed
Add missing init_user.sh script
1 parent 70fcca3 commit e9adf06

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/build-stacks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
filters: |
4444
unity_datascience:
4545
- 'unity_datascience/**'
46+
- 'common/**'
4647
- '.github/workflows/**'
4748
- '.env'
4849
build:

common/unity-sds/init_user.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
skel_src_dir=/etc/unity-sds/jupyter_skel
4+
user_dst_dir=/home/jovyan
5+
6+
# Find files and directories in $skel_src_dir at the root level
7+
mapfile -t skel_config_fns < <(find $skel_src_dir -mindepth 1 -maxdepth 1 -printf '%f\n')
8+
9+
# Only copy files if the destination in the Jupyter home directory does not exist
10+
for skel_fn in "${skel_config_fns[@]}"; do
11+
if [ -e "${skel_src_dir}/${skel_fn}" ] && [ ! -e "${user_dst_dir}/${skel_fn}" ]; then
12+
cp -a "${skel_src_dir}/${skel_fn}" "${user_dst_dir}/${skel_fn}"
13+
fi
14+
done

0 commit comments

Comments
 (0)