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