diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-17 17:11:10 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-17 17:11:10 +0200 |
commit | e7fd03f92e3fa5433b367058ea5ce6220a126c93 (patch) | |
tree | cf8d64d4f1f96c065445d47223fcee576e556d14 /xlocate | |
parent | c6709af75061196ace55db380aeff045715ba4e4 (diff) | |
download | xtools-e7fd03f92e3fa5433b367058ea5ce6220a126c93.tar.gz xtools-e7fd03f92e3fa5433b367058ea5ce6220a126c93.tar.xz xtools-e7fd03f92e3fa5433b367058ea5ce6220a126c93.zip |
xlocate: check refs/heads/master, better message
Diffstat (limited to 'xlocate')
-rwxr-xr-x | xlocate | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xlocate b/xlocate index 30234bc..5f5d387 100755 --- a/xlocate +++ b/xlocate @@ -67,8 +67,12 @@ elif [ "$1" = -S ]; then fi if [ -d "$XLOCATE_GIT" ]; then - if find /var/db/xbps/ -name '*repodata' -newer "$XLOCATE_GIT/HEAD" | grep -q .; then - echo "xlocate: database outdated, please run xlocate -g." 1>&2 + if find /var/db/xbps/ -name '*repodata' -newer "$XLOCATE_GIT/refs/heads/master" | grep -q .; then + if grep -q origin "$XLOCATE_GIT/config"; then + echo "xlocate: database outdated, please run xlocate -S." 1>&2 + else + echo "xlocate: database outdated, please run xlocate -g." 1>&2 + fi fi git -c grep.lineNumber=false --git-dir="$XLOCATE_GIT" grep "$@" @ | sed 's/^@://; s/:/\t/' | grep . |