Mercurial > hg > aboriginal
changeset 173:8b4c243a212e
Add better debug info to a status report, and stop fighting ubuntu so much
over dash vs bash. (Both suck.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 18 Jun 2007 00:37:54 -0400 |
parents | 4e4f459de3db |
children | d373ff1ed679 |
files | include.sh |
diffstat | 1 files changed, 8 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/include.sh Wed May 30 16:02:01 2007 -0400 +++ b/include.sh Mon Jun 18 00:37:54 2007 -0400 @@ -1,11 +1,4 @@ -#!/bin/sh - -temp=`ls -l /bin/sh | sed 's/.*-> //'` -if [ "$temp" == "dash" ] -then - echo "Error: your /bin/sh points to dash." - exit 1 -fi +#!/bin/bash function download() { @@ -104,22 +97,21 @@ { # Is it a bzip2 or gzip tarball? - FILE="${LINKDIR}/$1" - if [ -f "${FILE}".tar.bz2 ] + FILE="$1".tar.bz2 + DECOMPRESS="j" + + if [ ! -f "${LINKDIR}/${FILE}" ] then - FILE="${FILE}".tar.bz2 - DECOMPRESS="j" - else - FILE="${FILE}".tar.gz + FILE="$1".tar.gz DECOMPRESS="z" fi # Announce package, with easy-to-grep-for "===" marker. Extract it. echo "=== Building $1 ($ARCH_NAME)" - echo -n "Extracting" + echo -n "Extracting '${FILE}'" cd "${WORK}" && - { tar xv${DECOMPRESS}f "$FILE" || dienow + { tar xv${DECOMPRESS}f "${LINKDIR}/${FILE}" || dienow } | dotprogress # Do we have a separate working directory?