Merge pull request #569 from uqam-fob/fix-pkg-openbsd-pkg_version

__package_pkg_openbsd: fix pkg_version explorer
This commit is contained in:
Darko Poljak 2017-09-04 20:26:56 +02:00 committed by GitHub
commit c69e8a58b9

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2011 Andi Brönnimann (andi-cdist at v-net.ch)
# Copyright 2017, Philippe Gregoire <pg@pgregoire.xyz>
#
# This file is part of cdist.
#
@ -28,4 +29,4 @@ else
fi
#TODO: Is there a better way?
pkg_info | grep "$name" | sed 's .*\(-[0-9.][0-9.]*\).* \1 ' | sed 's/-//'
pkg_info | grep "^$name-[0-9]" | sed 's|.*\(-[0-9][0-9.]*\).*|\1|' | sed 's/-//'