Bugfix
Modified pipeline to determine ${name}'s version if it's installed.
This commit is contained in:
parent
3ebda62f04
commit
5dc8d305e5
1 changed files with 5 additions and 1 deletions
|
@ -30,6 +30,10 @@ fi
|
||||||
# Don't produce "no pkgs installed" output -- breaks things
|
# Don't produce "no pkgs installed" output -- breaks things
|
||||||
PKG_OUTPUT=$(pkg_info 2>&1)
|
PKG_OUTPUT=$(pkg_info 2>&1)
|
||||||
if [ ! "$PKG_OUTPUT" = "pkg_info: no packages installed" ]; then
|
if [ ! "$PKG_OUTPUT" = "pkg_info: no packages installed" ]; then
|
||||||
echo "$(echo "$PKG_OUTPUT" | grep "^$name-" | cut '-d ' -f1 | sed "s/$name-//g")"
|
echo -n "$(echo "$PKG_OUTPUT" \
|
||||||
|
| awk '{print $1}' \
|
||||||
|
| sed 's/^\(.*\)-\([^-]*\)$/name:\1 ver:\2/g' \
|
||||||
|
| grep "name:$name ver:" \
|
||||||
|
| sed 's/^.*ver:\(.*\)/\1/g')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue