15 lines
240 B
Bash
Raw Normal View History

2018-02-27 17:20:56 +04:00
#! /bin/bash
2018-02-28 11:15:40 +04:00
set +u
if [[ "$DEP" == "" ]]; then
2018-02-28 12:24:26 +04:00
DEP=$GOPATH/src/github.com/tendermint/tendermint/Gopkg.lock
2018-02-28 11:15:40 +04:00
fi
set -u
2018-02-28 12:24:26 +04:00
2018-02-28 11:15:40 +04:00
set -euo pipefail
2018-02-27 17:20:56 +04:00
LIB=$1
2018-02-28 11:15:40 +04:00
grep -A100 "$LIB" "$DEP" | grep revision | head -n1 | grep -o '"[^"]\+"' | cut -d '"' -f 2