distribution/packages/jelos/sources/scripts/run

36 lines
582 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020-present Fewtarius
. /etc/profile
ui_state() {
clear >/dev/console 2>&1
systemctl ${1} ${UI_SERVICE}
}
if [ "${UI_SERVICE}" = "weston.service" ]
then
2022-11-03 01:43:14 +00:00
if [ -f "${*}" ]
then
RUN=$(echo ${*} | sed 's# #\\ #g')
weston-terminal --command="${RUN}"
else
weston-terminal --command="${*}"
fi
else
ui_state stop
clear >/dev/console 2>&1
$* >/dev/console 2>&1
if [ "$?" == 0 ]
then
ui_state start
exit 0
else
"$*" >/dev/console 2>&1
ui_state start
exit 0
fi
fi