You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
611 B
23 lines
611 B
#!/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" |