system-tools: add st

This commit is contained in:
mglae 2020-12-25 16:15:10 +01:00
parent b03dd0a9e1
commit 4fc634f6bc
2 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -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')):
if yes: yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec mrxvt -ls"], shell=False, close_fds=True) if yes:
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')