mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
system-tools: add st
This commit is contained in:
parent
b03dd0a9e1
commit
4fc634f6bc
@ -52,7 +52,7 @@ PKG_DEPENDS_TARGET="toolchain \
|
|||||||
ytop"
|
ytop"
|
||||||
|
|
||||||
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET efibootmgr"
|
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET efibootmgr st"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
addon() {
|
addon() {
|
||||||
@ -146,6 +146,9 @@ addon() {
|
|||||||
# smartmontools
|
# smartmontools
|
||||||
cp -P $(get_install_dir smartmontools)/usr/sbin/smartctl $ADDON_BUILD/$PKG_ADDON_ID/bin
|
cp -P $(get_install_dir smartmontools)/usr/sbin/smartctl $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||||
|
|
||||||
|
# st
|
||||||
|
cp -P $(get_build_dir st)/st $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :
|
||||||
|
|
||||||
# strace
|
# strace
|
||||||
cp -P $(get_install_dir strace)/usr/bin/strace $ADDON_BUILD/$PKG_ADDON_ID/bin
|
cp -P $(get_install_dir strace)/usr/bin/strace $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||||
|
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
import xbmcaddon
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os.path
|
||||||
|
|
||||||
yes = xbmcgui.Dialog().yesno('', 'This is a console-only addon','','Open a terminal window?','No','Yes')
|
if os.path.exists(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'bin/st')):
|
||||||
|
yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
|
||||||
if yes:
|
if yes:
|
||||||
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec mrxvt -ls"], shell=False, close_fds=True)
|
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec st -e sh -l"], shell=False, close_fds=True)
|
||||||
|
else:
|
||||||
|
xbmcgui.Dialog().ok('System Tools', 'This is a console-only addon')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user