aboutsummaryrefslogtreecommitdiff
path: root/build/pass
blob: 0c06564aaceabf49b07fc38ef83bc59586759b5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
set -e
set -x

_install() {
remote=""
dest=""
while [ $# -gt 0 ] ; do case $1 in
	-r) remote="$2"; shift ; shift ;;
	-d) dest="$2"; shift ; shift ;;
	-m) _mkopts="$2"; shift ; shift ;;
	*) echo "Unknown option $1" ; return ;;
esac ; done

if ! [ -d "$dest" ] ; then
	git clone "$remote" "$dest"
fi

cd "$dest"

git pull --ff-only origin master

sudo make $_mkopts install
}

_install -d /v/pub/pass -r https://git.zx2c4.com/password-store
_install -d /v/pub/pass-otp -r https://github.com/tadfisher/pass-otp \
	-m PREFIX=/usr