source: trunk/minix/commands/scripts/getpack.sh@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 478 bytes
Line 
1#!/bin/sh
2
3if [ $# -ne 1 ]
4then echo "Usage: $0 <url>"
5 exit 1
6fi
7
8if [ -z "$HOME" ]
9then echo "Where is your \$HOME? "
10 exit 1
11fi
12
13if [ ! -d "$HOME" ]
14then echo "Where is your \$HOME ($HOME) ? "
15 exit 1
16fi
17
18tmpdir=$HOME/getpack$$
19tmpfile=package
20tmpfiletar=$tmpfile.tar
21tmpfiletargz=$tmpfile.tar.gz
22
23mkdir -m 700 $tmpdir || exit 1
24cd $tmpdir || exit 1
25
26urlget "$1" >$tmpfiletargz
27
28gzip -d $tmpfiletargz || exit 1
29tar xf $tmpfiletar || exit 1
30make && make install && echo "Ok."
Note: See TracBrowser for help on using the repository browser.