diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2005-12-20 09:51:02 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2005-12-20 09:51:02 +0000 |
commit | 2f23af3793bba78d53c605bc8fdfed6f8b7987e2 (patch) | |
tree | 6ef11bf2df39f698891b98462a6e2a812f33b751 /scripts/ipkg-revision | |
parent | 4275034a70b2c42526cafe830bee21be87439e59 (diff) | |
download | ptxdist-2f23af3793bba78d53c605bc8fdfed6f8b7987e2.tar.gz ptxdist-2f23af3793bba78d53c605bc8fdfed6f8b7987e2.tar.xz |
more verbose error messages; print out new packet name on stdout
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@3552 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/ipkg-revision')
-rwxr-xr-x | scripts/ipkg-revision | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/ipkg-revision b/scripts/ipkg-revision index c38acaf98..e76730b5a 100755 --- a/scripts/ipkg-revision +++ b/scripts/ipkg-revision @@ -13,9 +13,11 @@ IPKG_DIR=`dirname $IPKG` NEW_REV_PART=$2 NEW_PKG_PART=$3 +PREFIX=`basename $0` + usage() { echo - [ -n "$1" ] && echo -e "error: $1\n" + [ -n "$1" ] && echo -e "${PREFIX} error: $1\n" echo "usage: $0 <some.ipk> [upstream revision] [packet revision]" echo echo "upstream revision: '-': no change" @@ -27,7 +29,7 @@ usage() { # # Sanity checks # -[ -z "$IPKG" ] && usage "error: specify ipkg packet dir as first argument" +[ -z "$IPKG" ] && usage "${PREFIX} error: specify ipkg packet dir as first argument" if [ ! -f "$IPKG" ]; then echo -e "\nError: couldn't find $IPKG\n" @@ -95,7 +97,8 @@ fi # if [ -e "${IPKG_DIR}/${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk" ]; then - echo "error: ${IPKG_DIR}/${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk already exists" + echo "${PREFIX} error: ${IPKG_DIR}/${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk already exists" >&2 + echo ${IPKG_DIR}/${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk rm -fr ${TMPDIR} exit 1 fi @@ -120,9 +123,7 @@ ar r ${IPKG_DIR}/${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk `find . popd 2>&1 > /dev/null -echo "REVISION=$REVISION" -echo "REV_PART=$REV_PART" -echo "PKG_PART=$PKG_PART" +echo ${PACKAGE}_${NEW_REV_PART}${NEW_PKG_PART}_${ARCH}.ipk rm -fr ${TMPDIR} |