From 31d51052e1f4f7502ca8c5c0bf3bc62eb150fb98 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 18 Jun 2013 12:53:26 +1000 Subject: checkupdates: Consistency in environmental variable name Use CHECKUPDATES_DB rather than CHECKUPDATE_DB for consistency with the script name. Signed-off-by: Allan McRae --- contrib/checkupdates.sh.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'contrib/checkupdates.sh.in') diff --git a/contrib/checkupdates.sh.in b/contrib/checkupdates.sh.in index 0079a244..48ceff94 100644 --- a/contrib/checkupdates.sh.in +++ b/contrib/checkupdates.sh.in @@ -21,23 +21,23 @@ if (( $# > 0 )); then echo "checkupdates: Safely print a list of pending updates." echo "Use: checkupdates" - echo "Export the 'CHECKUPDATE_DB' variable to change the path of the temporary database." + echo "Export the 'CHECKUPDATES_DB' variable to change the path of the temporary database." exit 0 fi -if [[ -z $CHECKUPDATE_DB ]]; then - CHECKUPDATE_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" +if [[ -z $CHECKUPDATES_DB ]]; then + CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" fi -trap 'rm -f $CHECKUPDATE_DB/db.lck' INT TERM EXIT +trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT DBPath="${DBPath:-@localstatedir@/lib/pacman/}" eval $(awk -F' *= *' '$1 ~ /DBPath/ { print $1 "=" $2 }' @sysconfdir@/pacman.conf) -mkdir -p "$CHECKUPDATE_DB" -ln -s "${DBPath}/local" "$CHECKUPDATE_DB" &> /dev/null -fakeroot pacman -Sy --dbpath "$CHECKUPDATE_DB" --logfile /dev/null &> /dev/null -pacman -Qqu --dbpath "$CHECKUPDATE_DB" 2> /dev/null +mkdir -p "$CHECKUPDATES_DB" +ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null +fakeroot pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null +pacman -Qqu --dbpath "$CHECKUPDATES_DB" 2> /dev/null exit 0 -- cgit v1.2.3-70-g09d2