From 9faa8a9478eb5b16ba2f733521c58a05fa8a0323 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 12 Sep 2005 12:26:18 +0000 Subject: [PATCH] Added getpack, the fabulous minix package manager. --- commands/scripts/Makefile | 4 ++++ commands/scripts/getpack.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 commands/scripts/getpack.sh diff --git a/commands/scripts/Makefile b/commands/scripts/Makefile index feee89308..5f3dc1e81 100755 --- a/commands/scripts/Makefile +++ b/commands/scripts/Makefile @@ -24,6 +24,7 @@ usr: \ /usr/bin/false \ /usr/bin/gcc \ /usr/bin/getopts \ + /usr/bin/getpack \ /usr/bin/read \ /usr/bin/test \ /usr/bin/true \ @@ -95,6 +96,9 @@ clean: /usr/bin/wait: /usr/bin/cd install -m 755 -l $? $@ +/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 new file mode 100644 index 000000000..12eb50463 --- /dev/null +++ b/commands/scripts/getpack.sh @@ -0,0 +1,30 @@ +#!/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." -- 2.44.0