#!/bin/bash set -e TARGET_DIR="${HOME}/.local/smart-docker" APPS_DIR="${HOME}/.local/share/applications/" # Build current docker image from Dockerfile docker build -t notebook-gui . # Create target directory in user home if [ ! -d "${TARGET_DIR}" ]; then mkdir -p "${TARGET_DIR}" fi # Copy necessary files over cp SMART_Notebook.png start.sh "${TARGET_DIR}/" cp notebook-docker.desktop "${HOME}/.local/share/applications/" # Mark start.sh as executable chmod +x "${TARGET_DIR}/start.sh" # Replace variable in desktop file sed -i "s#{{TARGET_DIR}}#${TARGET_DIR}#g" "${APPS_DIR}/notebook-docker.desktop"