Files
emcomm-tools-os-community/scripts/install-et-user-app.sh
T

52 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
# Author : Gaston Gonzalez
# Date : 8 August 2026
# Purpose : Builds and installs et-user-app
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
. ./env.sh
2026-08-08 21:17:19 -07:00
. ../overlay/opt/emcomm-tools/bin/et-common
APP="et-user-app"
VERSION="1.0.0"
APP_AND_VERSION="${APP}-${VERSION}"
GIT_TAG="${VERSION}"
GIT_URL="https://github.com/thetechprepper/et-user-app.git"
GIT_WORKSPACE="${APP}"
INSTALL_DIR="/opt/${APP_AND_VERSION}"
BIN_DIR="${INSTALL_DIR}/bin"
LINK_PATH="/opt/${APP}"
et-log "Installing ${APP} ${VERSION}"
et-log "Installing build dependencies..."
apt install \
libgtk-3-dev \
libgtk-3-doc \
libjson-glib-dev \
-y
CWD_DIR=`pwd`
cd ${ET_SRC_DIR}
[[ ! -e ${GIT_WORKSPACE} ]] && git clone ${GIT_URL} ${GIT_WORKSPACE}
cd ${GIT_WORKSPACE}
git checkout ${GIT_TAG}
make
mkdir -v -p "${BIN_DIR}"
cp ${APP} ${BIN_DIR}
[[ -e ${LINK_PATH} ]] && rm ${LINK_PATH}
ln -v -s ${INSTALL_DIR} ${LINK_PATH}
stow -v -d /opt ${APP} -t /usr/local
2026-08-08 21:17:19 -07:00
cd ${CWD_DIR}
cp -v ../overlay/usr/share/applications/et-user.desktop /usr/share/applications