Fallback to uname(1) if freebsd-version(1) is not found
Differential Revision: https://reviews.freebsd.org/D24994
This commit is contained in:
parent
4ca20f66a1
commit
d0d841e0c2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=537499
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= etc_os-release
|
||||
PORTVERSION= 0.1
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= sysutils kde gnome
|
||||
MASTER_SITES= #
|
||||
DISTFILES= #
|
||||
@ -15,7 +15,11 @@ NO_BUILD= yes
|
||||
|
||||
PLIST_FILES= etc/os-release
|
||||
|
||||
.if exists(/bin/freebsd-version)
|
||||
VERSION!= freebsd-version -u
|
||||
.else
|
||||
VERSION!= uname -r
|
||||
.endif
|
||||
VERSION_ID= ${VERSION:C/^([0-9\.]+).*/\1/}
|
||||
|
||||
CONTENTS= 'NAME=FreeBSD\0'$\
|
||||
|
Loading…
Reference in New Issue
Block a user