aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-03-09 23:04:20 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-03-09 23:04:20 +0000
commit976b001efddcddf0fe0058dfc426469eac390a15 (patch)
treea14e4476f1e3a36f024afec3398cd6884e84fc35 /Tools
parent7bdc623fd891826f035929c6865d05a514a233e5 (diff)
downloadports-976b001efddcddf0fe0058dfc426469eac390a15.tar.gz
ports-976b001efddcddf0fe0058dfc426469eac390a15.zip
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/5/bindist/files/usr/bin/uname67
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