Skip to content

Commit

Permalink
Add missing init_user.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
mcduffie committed Feb 16, 2024
1 parent 70fcca3 commit e9adf06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-stacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
filters: |
unity_datascience:
- 'unity_datascience/**'
- 'common/**'
- '.github/workflows/**'
- '.env'
build:
Expand Down
14 changes: 14 additions & 0 deletions common/unity-sds/init_user.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

skel_src_dir=/etc/unity-sds/jupyter_skel
user_dst_dir=/home/jovyan

# Find files and directories in $skel_src_dir at the root level
mapfile -t skel_config_fns < <(find $skel_src_dir -mindepth 1 -maxdepth 1 -printf '%f\n')

# Only copy files if the destination in the Jupyter home directory does not exist
for skel_fn in "${skel_config_fns[@]}"; do
if [ -e "${skel_src_dir}/${skel_fn}" ] && [ ! -e "${user_dst_dir}/${skel_fn}" ]; then
cp -a "${skel_src_dir}/${skel_fn}" "${user_dst_dir}/${skel_fn}"
fi
done

0 comments on commit e9adf06

Please sign in to comment.