diff options
author | kris <kris@FreeBSD.org> | 2002-03-10 07:04:20 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-03-10 07:04:20 +0800 |
commit | 74ee11202cde360735062f47db4406d26fe2f2c1 (patch) | |
tree | dc0f87e1e194db6a62ebc793a456ca0151cf4ffa /Tools | |
parent | 2ad49f5dc7397c0c344e8813b78243c2e2ca0661 (diff) | |
download | freebsd-ports-gnome-74ee11202cde360735062f47db4406d26fe2f2c1.tar.gz freebsd-ports-gnome-74ee11202cde360735062f47db4406d26fe2f2c1.tar.zst freebsd-ports-gnome-74ee11202cde360735062f47db4406d26fe2f2c1.zip |
Add new version of uname for 5.x bindists
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/5/bindist/files/usr/bin/uname | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Tools/portbuild/5/bindist/files/usr/bin/uname b/Tools/portbuild/5/bindist/files/usr/bin/uname new file mode 100755 index 000000000000..a71ec89abd1b --- /dev/null +++ b/Tools/portbuild/5/bindist/files/usr/bin/uname @@ -0,0 +1,67 @@ +#!/bin/sh + +# "sed -e 's/\(.\)/ -\1/g'" can be used to convert "abc" to "-a -b -c" + +a=0 +m=0 +n=0 +r=0 +s=0 +v=0 + +if [ $# = 0 ]; then + s=1 +else + set $(printf "%s\n" "$*" | sed -e 's/-//g' -e 's/\([a-z]\)/ \1/g') + while [ $# -gt 0 ]; do + eval $1=1 + shift + done +fi + +if [ "$a" = 1 ]; then + m=1 + n=1 + r=1 + s=1 + v=1 +fi + +printed=0 + +if [ "$s" = 1 ]; then + echo -n "FreeBSD" + printed=1 +fi + +printsp () { + if [ $1 = 1 ]; then + echo -n " " + fi +} + +if [ "$n" = 1 ]; then + printsp $printed + echo -n $(hostname) + printed=1 +fi + +if [ "$r" = 1 ]; then + printsp $printed + echo -n "5.0-CURRENT" + printed=1 +fi + +if [ "$v" = 1 ]; then + printsp $printed + echo -n "FreeBSD 5.0-CURRENT #0: Sun Mar 18 03:47:56 PST 2000 asami@bento.freebsd.org:/usr/src/sys/compile/BENTO" + printed=1 +fi + +if [ "$m" = 1 ]; then + printsp $printed + echo -n "i386" + printed=1 +fi + +echo |