upgpkg: discord-electron-openasar 0.0.55+827-3: remove python dep
* Check for Python availability in launcher script as it's only necessary for Krisp patcher
This commit is contained in:
parent
b91cd3a6e8
commit
f729610680
3 changed files with 12 additions and 10 deletions
|
@ -10,15 +10,18 @@ declare -l PATCH_KRISP
|
|||
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
|
||||
krisp_bin="${DISCORD_USER_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@}/@PKGVER@/modules/@PKGNAME@_krisp/@PKGNAME@_krisp.node"
|
||||
|
||||
if [[ "${PATCH_KRISP:-}" == true ]] && [[ -w "${krisp_bin}" ]] && python -c "import capstone; import elftools" &> /dev/null; then
|
||||
# Patch Krisp binary to ignore signature check
|
||||
python /usr/lib/@PKGNAME@/krisp-patcher.py "${krisp_bin}"
|
||||
if [[ "${PATCH_KRISP:-}" == true ]] && [[ -w "${krisp_bin}" ]]; then
|
||||
if hash python &> /dev/null && python -c 'import capstone; import elftools' &> /dev/null; then
|
||||
# Patch Krisp binary to ignore signature check
|
||||
echo -n 'Running Krisp patcher... '
|
||||
python /usr/lib/@PKGNAME@/krisp-patcher.py "${krisp_bin}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -r "${flags_file}" ]]; then
|
||||
# Replacing because old flag does not work
|
||||
if [[ -w "${flags_file}" ]] && grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
|
||||
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
|
||||
sed -i 's|--ignore-gpu-blacklist|--ignore-gpu-blocklist|' "${flags_file}"
|
||||
fi
|
||||
mapfile -t < "${flags_file}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue