diff options
author | Manuel Hüsers | 2024-06-10 20:30:20 +0200 |
---|---|---|
committer | Manuel Hüsers | 2024-06-10 20:30:20 +0200 |
commit | add7b077fa8bd41a44e9c10995a2211c30236f03 (patch) | |
tree | 8180a4a879cac92784bf75737be164df274e1cf8 /discord-launcher.sh | |
parent | 651975fed7cc51ff5e03fbcb12a54d9f17d2aeb3 (diff) | |
download | aur-add7b077fa8bd41a44e9c10995a2211c30236f03.tar.gz |
upgpkg: discord 0.0.55-4: remove python dep
* Check for Python availability in launcher script as it's only necessary for Krisp patcher
Diffstat (limited to 'discord-launcher.sh')
-rwxr-xr-x | discord-launcher.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/discord-launcher.sh b/discord-launcher.sh index 81bc714870f0..02a3479e49bd 100755 --- a/discord-launcher.sh +++ b/discord-launcher.sh @@ -14,9 +14,12 @@ declare -l PATCH_KRISP flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf" krisp_bin="${DISCORD_USER_DATA_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/${name}}/${ver}/modules/${name}_krisp/${name}_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/share/${name}/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/share/${name}/krisp-patcher.py "${krisp_bin}" + fi fi if [[ -r "${flags_file}" ]]; then |