morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 713d7974ad6107c13f8ff2ba5bca6de7b3cd5250
parent 6cf0949e99a7b1387afa9104b344ff2bc58404c1
Author: sin <sin@2f30.org>
Date:   Tue Mar  4 15:34:45 +0000

Change fetch-pkg.mk to use case instead of if/elif etc.

Diffstat:
stuff/fetch-pkg.mk | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/stuff/fetch-pkg.mk b/stuff/fetch-pkg.mk @@ -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 -