summarylogtreecommitdiffstats
path: root/proxypin.sh
blob: c6da7ff647b0ab448c6277e6a26d68aeb7545784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -o pipefail

_APPDIR="/usr/lib/@appname@"
_RUNNAME="${_APPDIR}/@runname@"

export PATH="${_APPDIR}/lib:${PATH}"

cd "${_APPDIR}" || exit 1

# 🔥 KDE6 兼容(最稳)
if ! command -v kwriteconfig5 >/dev/null 2>&1 && command -v kwriteconfig6 >/dev/null 2>&1; then
    fakebin="$(mktemp -d)"
    ln -sf /usr/bin/kwriteconfig6 "$fakebin/kwriteconfig5"
    export PATH="$fakebin:$PATH"
fi

exec "${_RUNNAME}" "$@"