# HG changeset patch # User Christophe Lincoln # Date 1387660524 -3600 # Node ID ee5a53b16e515e1f3d6f3dba8099a1724dbf3e33 # Parent 2fb881927791d283860b8b47221abeed11cafe84 Some fixes to the --get option diff -r 2fb881927791 -r ee5a53b16e51 lib/libspk.sh --- a/lib/libspk.sh Sat Dec 21 19:06:05 2013 +0100 +++ b/lib/libspk.sh Sat Dec 21 22:15:24 2013 +0100 @@ -162,7 +162,6 @@ local pwd=$(pwd) [ "$quiet" ] && local quiet="-q" [ "$cache" ] && local pwd=$CACHE_DIR - [ "$get" ] || local pwd=$CACHE_DIR [ "$forced" ] && rm -f $pwd/$file debug "download file: $file" debug "DB: $db" @@ -197,8 +196,8 @@ cd $CACHE_DIR && check_download fi # Be sure the file was fetched. - if [ ! -f "$pwd/$file" ] || [ ! -f "$CACHE_DIR/$file" ]; then - gettext "ERROR: Missing file:"; colorize 31 " $file" + if [ ! -f "$CACHE_DIR/$file" ] && [ ! -f "$pwd/$file" ]; then + gettext "ERROR: Missing file:"; colorize 31 " $CACHE_DIR/$file" newline && exit 1 fi } diff -r 2fb881927791 -r ee5a53b16e51 spk --- a/spk Sat Dec 21 19:06:05 2013 +0100 +++ b/spk Sat Dec 21 22:15:24 2013 +0100 @@ -112,6 +112,11 @@ count=$(($count + 1)) download $package_full $mirror unset_mirrored + if [ ! "$cache" ]; then + gettext "Moving package to current directory..." + mv -f "$CACHE_DIR/$package_full" . + status + fi newline && continue ;; esac # Installed ?