diff options
Diffstat (limited to 'toru')
-rwxr-xr-x | toru | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -12,7 +12,7 @@ # * Possibility to hook up ABS dirs besides ABSROOT (low priority) # * Tell updates and non available binary packages (working on this) -source $(dirname $0)/toru-utils +source $(dirname $(command -v $0))/toru-utils # Saves contents on a named cache # $1 cache name (repo) @@ -137,7 +137,7 @@ update() { fi - package_paths=($(read_cache ${_repo}.paths)) + package_paths=($(read_cache ${_repo}.paths || true)) # Inform how many PKGBUILDS were found and quit immediately if none $quiet || msg "Found $((${#pkgbuilds[*]}-1)) PKGBUILDs to update" @@ -148,7 +148,7 @@ update() { update_sync_file=true # Load PKGBUILD's metadata - source ${_pkgbuild} + source ${_pkgbuild} || continue # Guess pkgbase from PKGBUILD's basedir _pkgpath=$(dirname "${_pkgbuild}") @@ -165,7 +165,7 @@ update() { for _pkg in ${pkgname[@]}; do # Keep removing unneeded stuff - unset package_${_pkg} >/dev/null 2>&1 + unset package_${_pkg} >/dev/null 2>&1 || true # Fill the list of packages to find packages_in_abs+=($_pkg-$(get_full_version ${epoch:-0} $pkgver $pkgrel)) package_paths+=($_pkg:$_pkgpath) @@ -199,7 +199,7 @@ update() { split_pkgname_from_pkgver ${TMPDIR}/packages_in_abs | sort -k1b,1 > ${TMPDIR}/in_abs split_pkgname_from_pkgver ${TMPDIR}/packages_in_sync | sort -k1b,1 > ${TMPDIR}/in_sync - $quiet || msg "This packages are available to update" + $quiet || msg "These packages are available to update" # Join both files by pkgname, the end result is: # pkgname syncver absver join ${TMPDIR}/in_sync ${TMPDIR}/in_abs | \ @@ -297,8 +297,7 @@ while getopts 'haqfpum' arg; do f) force=true ;; u) commands+=(update);; p) shift $(( OPTIND - 1 )) - where_is "$1" - exit $?;; + where_is "$1" || exit 1;; m) commands+=(missing);; esac |