mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-08 16:31:28 +03:00
bundle smartctl with wrappe 👀
This commit is contained in:
@@ -32,11 +32,24 @@ chmod +x ./lib4bin
|
|||||||
/usr/lib/"$ARCH"-linux-gnu/qt6/plugins/xcbglintegrations/* \
|
/usr/lib/"$ARCH"-linux-gnu/qt6/plugins/xcbglintegrations/* \
|
||||||
/usr/lib/"$ARCH"-linux-gnu/qt6/plugins/wayland-*/*
|
/usr/lib/"$ARCH"-linux-gnu/qt6/plugins/wayland-*/*
|
||||||
|
|
||||||
|
# also use lib4bin to make a portable smartctl with wrappe
|
||||||
|
./lib4bin --with-wrappe "$(command -v smartctl)"
|
||||||
|
|
||||||
# prepare sharun
|
# prepare sharun
|
||||||
echo '#!/bin/sh
|
echo '#!/bin/sh
|
||||||
CURRENTDIR="$(dirname "$(readlink -f "$0")")"
|
CURRENTDIR="$(dirname "$(readlink -f "$0")")"
|
||||||
|
CACHEDIR="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||||
[ -f "$APPIMAGE".stylesheet ] && APPIMAGE_QT_THEME="$APPIMAGE.stylesheet"
|
[ -f "$APPIMAGE".stylesheet ] && APPIMAGE_QT_THEME="$APPIMAGE.stylesheet"
|
||||||
[ -f "$APPIMAGE_QT_THEME" ] && set -- "$@" "-stylesheet" "$APPIMAGE_QT_THEME"
|
[ -f "$APPIMAGE_QT_THEME" ] && set -- "$@" "-stylesheet" "$APPIMAGE_QT_THEME"
|
||||||
|
|
||||||
|
if ! command -v smartctl >/dev/null 2>&1; then
|
||||||
|
echo "smartctl is not on the system, using bundled binary..."
|
||||||
|
export PATH="$PATH:"$CACHEDIR"/qdiskinfo-appimage"
|
||||||
|
mkdir -p "$CACHEDIR"/qdiskinfo-appimage
|
||||||
|
cp -v "$CURRENTDIR"/smartctl "$CACHEDIR"/qdiskinfo-appimage
|
||||||
|
chmod +x "$CACHEDIR"/qdiskinfo-appimage/smartctl
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$CURRENTDIR"/bin/QDiskInfo "$@"' > ./AppRun
|
exec "$CURRENTDIR"/bin/QDiskInfo "$@"' > ./AppRun
|
||||||
chmod +x ./AppRun
|
chmod +x ./AppRun
|
||||||
./sharun -g
|
./sharun -g
|
||||||
|
|||||||
Reference in New Issue
Block a user