distribution/packages/jelos/sources/scripts/run

36 lines
628 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023-present - The JELOS Project (https://github.com/JustEnoughLinuxOS)
. /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