]> git.gir.st - sendHID.git/blob - pass-installer.sh
readme: dwc2 gets appended instead of overwriting the whole file
[sendHID.git] / pass-installer.sh
1 #!/bin/bash
2
3 git clone https://git.zx2c4.com/password-store
4 cd password-store/src
5 tee pass-patch.diff <<-EOF
6 --- password-store.sh.orig 2016-02-13 21:27:16.133642142 +0100
7 +++ password-store.sh 2016-02-13 14:02:17.412565405 +0100
8 @@ -324,7 +324,8 @@
9 else
10 echo "\${path%\/}"
11 fi
12 - tree -C -l --noreport "\$PREFIX/\$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|\$)/\1\2/g' # remove .gpg at end of line, but keep colors
13 + #tree -C -l --noreport "\$PREFIX/\$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|\$)/\1\2/g' # remove .gpg at end of line, but keep colors
14 + tree -f -i -l --noreport "\$PREFIX/\$path" | tail -n +2 |grep "\.gpg"| sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|\$\)/\1\2/g' | sed "s|\$PREFIX/||g"
15 elif [[ -z \$path ]]; then
16 die "Error: password store is empty. Try \"pass init\"."
17 else
18 EOF
19 patch <pass-patch.diff
20 cd ..
21 sudo make install
22
23 echo "finished."
24 echo "you can now use PASSWORD_STORE_GPG_OPTS=\"your_passphrase\" pass show foo/bar |head -n 1"
Imprint / Impressum