6
[Makefile] Check Installed Package Version on Ubuntu Linux
source link: http://siongui.github.io/2016/12/23/makefile-check-installed-package-version-on-ubuntu-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
[Makefile] Check Installed Package Version on Ubuntu Linux
December 23, 2016
Given an installed package name on Ubuntu Linux, find its version in Makefile.
Source code:
Makefile | repository | view raw
PACKAGE_NAME=python PACKAGE_VERSION=$(strip $(shell apt-cache policy $(PACKAGE_NAME) | grep Installed: | cut -d: -f2)) default: @echo "package name: \033[92m$(PACKAGE_NAME)\033[0m" @echo "package version: \033[92m$(PACKAGE_VERSION)\033[0m"
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK