cookutils rev 541 slitaz-tank
libcookorder.sh: Add a check to make sure incoming package exists before removing previous package and moving INCOMING package to PKGS.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Oct 06 15:02:15 2012 +0000 (2012-10-06) |
parents | 699d4f06e3dc |
children | d1f57160b838 |
files | lib/libcookorder.sh |
line diff
1.1 --- a/lib/libcookorder.sh Sun Sep 23 13:01:50 2012 +0000 1.2 +++ b/lib/libcookorder.sh Sat Oct 06 15:02:15 2012 +0000 1.3 @@ -694,10 +694,14 @@ 1.4 for PACKAGE in $incoming_pkgs; do 1.5 prev_VERSION=$(get_pkg_version $PKGS) 1.6 VERSION=$(get_pkg_version $INCOMING) 1.7 - remove_previous_package $PKGS 1.8 - echo "Moving $PACKAGE..." 1.9 - mv -f $INCOMING/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg $PKGS 1.10 - touch $PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg 1.11 + if [ -f $INCOMING/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg ]; then 1.12 + remove_previous_package $PKGS 1.13 + echo "Moving $PACKAGE..." 1.14 + mv -f $INCOMING/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg $PKGS 1.15 + touch $PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg 1.16 + else 1.17 + echo "$PACKAGE doesn't exist" 1.18 + fi 1.19 if [ "$AUTO_PURGE_SRC" ]; then 1.20 previous_tarball=$(grep ^$PACKAGE:main $SRC/sources.list | cut -f2) 1.21 sed -e "/^$PACKAGE:main/d" \