From 0d24b0fb02a19126b053ac163628dd6b585b5239 Mon Sep 17 00:00:00 2001 From: Jaby Date: Wed, 8 Jan 2025 22:13:27 +0100 Subject: [PATCH] Update PR --- podman/Dockerfile | 3 ++- podman/install.sh | 18 +++++++++++------- podman/scripts/make_gcc.sh | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/podman/Dockerfile b/podman/Dockerfile index c3d1315c..c278cf2d 100644 --- a/podman/Dockerfile +++ b/podman/Dockerfile @@ -1,7 +1,7 @@ FROM "ubuntu:22.04" WORKDIR /usr/scripts ADD ["scripts/make_gcc.sh", "/usr/scripts"] -WORKDIR /usr +WORKDIR /tmp RUN apt update && /usr/scripts/make_gcc.sh WORKDIR /usr/scripts @@ -12,6 +12,7 @@ ADD ["scripts/install_pop-fe.sh", "scripts/run_pop_fe.sh", "/usr/scripts"] WORKDIR /usr/jaby_engine/bin/extern RUN apt update && /usr/scripts/install_pop-fe.sh +WORKDIR /project ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}" ENV JABY_ENGINE_PATH=/jaby_engine ENV JABY_ENGINE_DIR=/jaby_engine diff --git a/podman/install.sh b/podman/install.sh index 73f40ff9..7c514c63 100755 --- a/podman/install.sh +++ b/podman/install.sh @@ -2,12 +2,16 @@ podman build -t jaby_engine . if [[ -z "${JABY_ENGINE_PATH}" ]]; then -echo "Setting JABY_ENGINE_PATH to parent folder" + echo "Setting JABY_ENGINE_PATH to parent folder" -SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" -JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")" -cat << End >> ~/.profile -export JABY_ENGINE_PATH="$JABY_ENGINE_PATH" -End -source ~/.profile + SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" + export JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")" + if cat /etc/passwd | grep $USER | grep bash > /dev/null; then + # Bash found + echo "export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"" >> ~/.bashrc + + else + # No bash found + echo "Please add export JABY_ENGINE_PATH="$JABY_ENGINE_PATH" to your shell profile" + fi fi \ No newline at end of file diff --git a/podman/scripts/make_gcc.sh b/podman/scripts/make_gcc.sh index 9e2a219c..a6331421 100755 --- a/podman/scripts/make_gcc.sh +++ b/podman/scripts/make_gcc.sh @@ -61,5 +61,5 @@ if [ $? -ne 0 ]; then fi echo "<<< Delete GCC folder >>>" -cd /usr +cd /tmp rm -fr psx-gcc \ No newline at end of file