From 0010c4c50019b3c32699fa82edba3e241e46963a Mon Sep 17 00:00:00 2001 From: Gary H <26419401+Gary-H9@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:30:42 +0000 Subject: [PATCH 1/2] :wrench: Kernel User script: joyvan -> analyticalplatform in kernel.json --- .../init/40-jupyter-kernel.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/opt/analytical-platform/init/40-jupyter-kernel.sh diff --git a/src/opt/analytical-platform/init/40-jupyter-kernel.sh b/src/opt/analytical-platform/init/40-jupyter-kernel.sh new file mode 100644 index 0000000..16425b8 --- /dev/null +++ b/src/opt/analytical-platform/init/40-jupyter-kernel.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Restore default Bash configuration if it doesn't exist + +echo "40-jupyter-kernel.sh" + +# Define the base directory to search +BASE_DIR="/home/jovyan/.local/share/jupyter/kernels" + +# Find all kernel.json files and replace 'jovyan' with 'analyticalplatform' +if [ -d "$BASE_DIR" ]; then + if find "$BASE_DIR" -name "kernel.json" | grep -q 'kernel.json'; then + find "$BASE_DIR" -name "kernel.json" -exec sed -i '' 's/jovyan/analyticalplatform/g' {} + + else + echo "No kernel.json files found in $BASE_DIR" + fi +else + echo "Base directory $BASE_DIR does not exist" +fi From d4c242026b711478f765ae348718555be5e9dcde Mon Sep 17 00:00:00 2001 From: Gary H <26419401+Gary-H9@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:45:57 +0000 Subject: [PATCH 2/2] Executable --- src/opt/analytical-platform/init/40-jupyter-kernel.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/opt/analytical-platform/init/40-jupyter-kernel.sh diff --git a/src/opt/analytical-platform/init/40-jupyter-kernel.sh b/src/opt/analytical-platform/init/40-jupyter-kernel.sh old mode 100644 new mode 100755