mirror of git://git.2f30.org/morpheus.git
Change fetch-pkg.mk to use case instead of if/elif etc.
This commit is contained in:
parent
6cf0949e99
commit
713d7974ad
|
@ -14,13 +14,20 @@ fetch-target:QP./stuff/cmp-fetch: .
|
|||
wget -c $url
|
||||
file=`basename $url`
|
||||
type=`file -b $file | cut -d ' ' -f 1`
|
||||
if test "$type" = "gzip"; then
|
||||
case "$type" in
|
||||
gzip)
|
||||
tar -xzf $file
|
||||
elif test "$type" = "bzip2"; then
|
||||
;;
|
||||
bzip2)
|
||||
tar -xjf $file
|
||||
elif test "$type" = "XZ"; then
|
||||
;;
|
||||
XZ)
|
||||
tar -xJf $file
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unknown file type $type" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cp $top/pkgs/$pkg $top/.cache/$target
|
||||
|
||||
|
|
Loading…
Reference in New Issue