🔧 chore(update): restart colorshell if there's an instance running after updating
This commit is contained in:
+3
-12
@@ -1,18 +1,9 @@
|
||||
source ./scripts/utils.sh
|
||||
|
||||
file="${1:-./build/colorshell}"
|
||||
|
||||
function is_running() {
|
||||
if gdbus introspect --session \
|
||||
--dest io.github.retrozinndev.colorshell \
|
||||
--object-path /io/github/retrozinndev/colorshell > /dev/null 2>&1
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function start() {
|
||||
if is_running; then
|
||||
if Is_running; then
|
||||
echo "[info] killing previous instance"
|
||||
colorshell quit || killall gjs
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user