Merge pull request #6316 from mglae/le11_systools_129

system-tools: rev 129; Execute "st" only on Generic X11; Set executable flag of 7z/7za
This commit is contained in:
CvH 2022-04-15 19:43:12 +02:00 committed by GitHub
commit 34cb2e65e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,6 @@
129
- Fix (set) 7z/7za executable flag
128
- Add mmc-utils

View File

@ -3,7 +3,7 @@
PKG_NAME="system-tools"
PKG_VERSION="1.0"
PKG_REV="128"
PKG_REV="129"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"

View File

@ -1,2 +1,4 @@
#!/bin/sh
exec /storage/.kodi/addons/virtual.system-tools/lib/p7zip/7z "$@"
file=/storage/.kodi/addons/virtual.system-tools/lib/p7zip/7z
[ ! -x ${file} ] && chmod +x ${file}
exec ${file} "$@"

View File

@ -1,2 +1,4 @@
#!/bin/sh
exec /storage/.kodi/addons/virtual.system-tools/lib/p7zip/7za "$@"
file=/storage/.kodi/addons/virtual.system-tools/lib/p7zip/7za
[ ! -x ${file} ] && chmod +x ${file}
exec ${file} "$@"

View File

@ -4,9 +4,16 @@
import xbmcaddon
import xbmcgui
import subprocess
import os.path
import re
import csv
if os.path.exists(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'bin/st')):
with open('/etc/os-release') as stream:
contents = stream.read().strip()
vars = re.findall(r"^[a-zA-Z0-9_]+=.*$", contents, flags=re.MULTILINE)
reader = csv.reader(vars, delimiter="=")
osrelease = dict(reader)
if osrelease['LIBREELEC_ARCH'] == 'x11.x86_64' or osrelease['LIBREELEC_ARCH'] == 'Generic-legacy.x86_64':
yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
if yes:
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec st -e sh -l"], shell=False, close_fds=True)