gstreamer: Update from 1.12.3 to 1.14.0
[termux-packages] / packages / pass / src-password-store.sh.patch
CommitLineData
796a5272
OS
1diff --git a/src/password-store.sh b/src/password-store.sh
2index 1ab6fb5..912b8b1 100755
3--- a/src/password-store.sh
4+++ b/src/password-store.sh
5@@ -11,7 +11,7 @@ GPG="gpg"
6 export GPG_TTY="${GPG_TTY:-$(tty 2>/dev/null)}"
afd500a7
FF
7 which gpg2 &>/dev/null && GPG="gpg2"
8 [[ -n $GPG_AGENT_INFO || $GPG == "gpg2" ]] && GPG_OPTS+=( "--batch" "--use-agent" )
796a5272
OS
9-
10+TMPDIR=$PREFIX/tmp
afd500a7 11 PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
796a5272 12 EXTENSIONS="${PASSWORD_STORE_EXTENSIONS_DIR:-$PREFIX/.extensions}"
afd500a7 13 X_SELECTION="${PASSWORD_STORE_X_SELECTION:-clipboard}"
796a5272 14@@ -156,12 +156,13 @@ clip() {
afd500a7
FF
15 # trailing new lines.
16 local sleep_argv0="password store sleep on display $DISPLAY"
796a5272 17 pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5
afd500a7
FF
18- local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)"
19- echo -n "$1" | xclip -selection "$X_SELECTION" || die "Error: Could not copy data to the clipboard"
afd500a7
FF
20+ local before="$(termux-clipboard-get 2>/dev/null | base64)"
21+ echo -n "$1" | termux-clipboard-set || die "Error: Could not copy data to the clipboard"
22 (
796a5272 23 ( exec -a "$sleep_argv0" bash <<<"trap 'kill %1' TERM; sleep '$CLIP_TIME' & wait" )
afd500a7
FF
24- local now="$(xclip -o -selection "$X_SELECTION" | base64)"
25- [[ $now != $(echo -n "$1" | base64) ]] && before="$now"
796a5272
OS
26+ local now="$(termux-clipboard-get | base64)"
27+ #removing -n here, because termux-clipboard-get always returns a newline while xclip does not
afd500a7
FF
28+ [[ $now != $(echo "$1" | base64) ]] && before="$now"
29
30 # It might be nice to programatically check to see if klipper exists,
31 # as well as checking for other common clipboard managers. But for now,
796a5272 32@@ -172,7 +173,7 @@ clip() {
afd500a7
FF
33 # so we axe it here:
34 qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
35
36- echo "$before" | base64 -d | xclip -selection "$X_SELECTION"
796a5272 37+ echo "$before" | base64 -d | termux-clipboard-set
afd500a7
FF
38 ) 2>/dev/null & disown
39 echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds."
40 }