From c85b2b79d4e070e7cf76dfa201b0d5f321a109b7 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 7 Jul 2017 14:39:39 +0900 Subject: [PATCH] =?UTF-8?q?run.sh=20=EC=B6=94=EA=B0=80,=20=ED=95=B4?= =?UTF-8?q?=EC=8B=9C=20=ED=8C=8C=EC=9D=BC=20=EC=83=9D=EC=84=B1=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/run.sh | 34 ++++++++++++++++++++++++++++++++++ scripts/mk-app.sh | 7 +++++++ 2 files changed, 41 insertions(+) create mode 100755 files/run.sh create mode 100755 scripts/mk-app.sh diff --git a/files/run.sh b/files/run.sh new file mode 100755 index 0000000..f696225 --- /dev/null +++ b/files/run.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +BASE_DIR=/prime +FILES="superdaemon superdaemon.ini app-prime-modbus app-prime-gui" + +for FILE in ${FILES} +do + FILE_PATH="${BASE_DIR}/${FILE}" + HASH_PATH="${FILE_PATH}.md5" + if [ ! -f ${FILE_PATH} -o ! -f ${HASH_PATH} ] + then + rm -rf ${BASE_DIR}/* + cp -rf /falinux/* ${BASE_DIR} + break + fi + + FILE_HASH=`md5sum ${FILE_PATH} | awk '{print $1}'` + HASH=`cat ${HASH_PATH}` + + if [ "${FILE_HASH}" != "${HASH}" ] + then + rm -rf ${BASE_DIR}/* + cp -rf /falinux/* ${BASE_DIR} + break + fi +done + +export QT_QPA_FB_TSLIB=1 +export TSLIB_TSDEVICE=/dev/input/event0 +export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:rotation=270 +export QT_QPA_EVDEV_KEYBOARD_PARAMETERS=/dev/input/event1 + +cd ${BASE_DIR} +./superdaemon & diff --git a/scripts/mk-app.sh b/scripts/mk-app.sh new file mode 100755 index 0000000..9b9469d --- /dev/null +++ b/scripts/mk-app.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +FILES="superdaemon superdaemon.ini app-prime-modbus app-prime-gui" +for FILE IN ${FILES} +do + md5sum ${FILE} | awk '{print $1}' > ${FILE}.md5 +done -- 2.1.4