termux-packages/packages/ytfzf/ytfzf.patch

39 lines
1.4 KiB
Diff

--- a/ytfzf
+++ b/ytfzf
@@ -168,7 +168,7 @@
# clean up only as parent process
#kill ytfzf sub process{{{
#i think this needs to be written to a file because of sub-shells
- jobs_file="${TMPDIR:-/tmp}/the-jobs-need-to-be-written-to-a-file.list"
+ jobs_file="${TMPDIR:-@TERMUX_PREFIX@/tmp}/the-jobs-need-to-be-written-to-a-file.list"
jobs -p > "$jobs_file"
while read -r line; do
[ "$line" ] && kill "$line" 2> /dev/null
@@ -312,7 +312,7 @@
: "${YTFZF_CUSTOM_THUMBNAILS_DIR:=$YTFZF_CONFIG_DIR/thumbnails}"
: "${YTFZF_EXTENSIONS_DIR:=$YTFZF_CONFIG_DIR/extensions}"
-: "${YTFZF_SYSTEM_ADDON_DIR:=/usr/local/share/ytfzf/addons}"
+: "${YTFZF_SYSTEM_ADDON_DIR:=@TERMUX_PREFIX@/share/ytfzf/addons}"
#}}}
@@ -325,7 +325,7 @@
#save the ecurrent environment so that any user set variables will be saved
if [ "$check_exists" -eq 1 ]; then
- tmp_env=/tmp/ytfzf-env
+ tmp_env=@TERMUX_PREFIX@/tmp/ytfzf-env
env > "$tmp_env"
fi
@@ -348,7 +348,7 @@
fzf_preview_side="left" thumbnail_viewer="ueberzug"
- w3mimgdisplay_path="/usr/lib/w3m/w3mimgdisplay"
+ w3mimgdisplay_path="@TERMUX_PREFIX@/tmp/lib/w3m/w3mimgdisplay"
# shortcuts
download_shortcut="alt-d" video_shortcut="alt-v" audio_shortcut="alt-m" detach_shortcut="alt-e" print_link_shortcut="alt-l" show_formats_shortcut="alt-f" info_shortcut="alt-i" search_again_shortcut="alt-s" next_page_shortcut="alt-p"