From 7c9fe576a8e7912915b5c8ac721cc8cc77b2c9f5 Mon Sep 17 00:00:00 2001 From: Erik van der Kouwe Date: Wed, 3 Feb 2010 13:51:26 +0000 Subject: [PATCH] Throw out getpack, replace printenv with a link to env --- commands/scripts/Makefile | 4 ---- commands/scripts/getpack.sh | 30 ------------------------------ commands/simple/Makefile | 9 ++------- commands/simple/printenv.c | 12 ------------ man/man1/env.1 | 8 ++++++++ 5 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 commands/scripts/getpack.sh delete mode 100644 commands/simple/printenv.c diff --git a/commands/scripts/Makefile b/commands/scripts/Makefile index c1df87a29..6a676e8f7 100644 --- a/commands/scripts/Makefile +++ b/commands/scripts/Makefile @@ -26,7 +26,6 @@ usr: \ /usr/bin/expr \ /usr/bin/false \ /usr/bin/getopts \ - /usr/bin/getpack \ /usr/bin/read \ /usr/bin/test \ /usr/bin/true \ @@ -110,9 +109,6 @@ clean: /usr/bin/easypack: easypack.sh install -m 755 -c -o bin $? $@ -/usr/bin/getpack: getpack.sh - install -m 755 -c -o bin $? $@ - /usr/bin/checkhier: checkhier.sh install -m 755 -c -o bin $? $@ diff --git a/commands/scripts/getpack.sh b/commands/scripts/getpack.sh deleted file mode 100644 index 12eb50463..000000000 --- a/commands/scripts/getpack.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -if [ $# -ne 1 ] -then echo "Usage: $0 " - exit 1 -fi - -if [ -z "$HOME" ] -then echo "Where is your \$HOME? " - exit 1 -fi - -if [ ! -d "$HOME" ] -then echo "Where is your \$HOME ($HOME) ? " - exit 1 -fi - -tmpdir=$HOME/getpack$$ -tmpfile=package -tmpfiletar=$tmpfile.tar -tmpfiletargz=$tmpfile.tar.gz - -mkdir -m 700 $tmpdir || exit 1 -cd $tmpdir || exit 1 - -urlget "$1" >$tmpfiletargz - -gzip -d $tmpfiletargz || exit 1 -tar xf $tmpfiletar || exit 1 -make && make install && echo "Ok." diff --git a/commands/simple/Makefile b/commands/simple/Makefile index 9d6fd975b..e12b78d16 100644 --- a/commands/simple/Makefile +++ b/commands/simple/Makefile @@ -146,7 +146,6 @@ ALL = \ prep \ printf \ printroot \ - printenv \ proto \ pwd \ pwdauth \ @@ -636,10 +635,6 @@ printf: printf.c $(CCLD) -o $@ $< @install -S 4kw $@ -printenv: printenv.c - $(CCLD) -o $@ $< - @install -S 4kw $@ - printroot: printroot.c $(CCLD) -o $@ $< @install -S 4kw $@ @@ -1485,8 +1480,8 @@ install: \ /usr/bin/printf: printf install -cs -o bin $< $@ -/usr/bin/printenv: printenv - install -cs -o bin $< $@ +/usr/bin/printenv: /usr/bin/env + install -ls -o bin /usr/bin/env /usr/bin/printenv /usr/bin/printroot: printroot install -cs -o bin $< $@ diff --git a/commands/simple/printenv.c b/commands/simple/printenv.c deleted file mode 100644 index 3aa724087..000000000 --- a/commands/simple/printenv.c +++ /dev/null @@ -1,12 +0,0 @@ - -#include - -int main(int argc, char *argv[], char *envp[]) -{ - int p; - for(p = 0; envp[p] && *envp[p]; p++) { - printf("%s\n", envp[p]); - } - return 0; -} - diff --git a/man/man1/env.1 b/man/man1/env.1 index 18628c8cb..bcc9735c9 100644 --- a/man/man1/env.1 +++ b/man/man1/env.1 @@ -7,6 +7,11 @@ env \- set environment for command .RI [ name\fB=\fIvalue "] ..." .RI [ utility .RI [ argument "...]]" +.B printenv +.RB [ \-ia ] +.RI [ name\fB=\fIvalue "] ..." +.RI [ utility +.RI [ argument "...]]" .SH DESCRIPTION .B Env modifies its environment according to the @@ -18,6 +23,9 @@ with the given arguments and the modified environment. If no utility is specified then the modified environment is printed as .IB name = value strings, one per line. +.PP +.B printenv +is identical to env in every way and is included for backward compatibility .SH OPTIONS .TP .B \-i -- 2.44.0