]> git.gir.st - hardpass.git/blob - pass/pass-installer.sh
update README to include adafruit license
[hardpass.git] / pass / pass-installer.sh
1 #!/bin/bash
2 # (C) 2016 Tobias Girstmair, released under the GNU GPL
3
4 git clone https://git.zx2c4.com/password-store
5 cd password-store/src
6 tee pass-patch.diff <<-EOF
7 --- password-store.sh.orig 2016-02-13 21:27:16.133642142 +0100
8 +++ password-store.sh 2016-02-13 14:02:17.412565405 +0100
9 @@ -324,7 +324,8 @@
10 else
11 echo "\${path%\/}"
12 fi
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 -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
15 + 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"
16 elif [[ -z \$path ]]; then
17 die "Error: password store is empty. Try \"pass init\"."
18 else
19 EOF
20 patch <pass-patch.diff
21 cd ..
22 sudo make install
23
24 echo "finished."
25 echo "you can now use PASSWORD_STORE_GPG_OPTS=\"your_passphrase\" pass show foo/bar |head -n 1"
Imprint / Impressum