diff options
Diffstat (limited to 'src/lib/libreblacklist')
-rwxr-xr-x | src/lib/libreblacklist | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/libreblacklist b/src/lib/libreblacklist index 5db1a3f..8aa33cc 100755 --- a/src/lib/libreblacklist +++ b/src/lib/libreblacklist @@ -2,11 +2,13 @@ # This may be included with or without `set -euE` # When run directly, it does `set -euE` -# Copyright (c) 2013 by Luke Shumaker <lukeshu@sbcglobal.net> +# Copyright (C) 2013-2014 Luke Shumaker <lukeshu@sbcglobal.net> +# +# License: GNU GPLv2+ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -48,7 +50,7 @@ blacklist-update() ( local remote_blacklist="$BLACKLIST" local local_blacklist="$XDG_CACHE_HOME/libretools/blacklist.txt" - stat_busy "Downloading blacklist of proprietary software packages" + _l stat_busy "Downloading blacklist of proprietary software packages" mkdir -p "${local_blacklist%/*}" if wget -N -q -O "${local_blacklist}.part" "$remote_blacklist" 2>/dev/null; then @@ -58,9 +60,9 @@ blacklist-update() ( stat_done rm "${local_blacklist}.part" if [[ -e "$local_blacklist" ]]; then - warning "Using local copy of blacklist" + _l warning "Using local copy of blacklist" else - error "Download failed, exiting" + _l error "Download failed, exiting" return 1 fi @@ -109,6 +111,8 @@ if [[ "${0##*/}" == libreblacklist ]]; then sed 's/\r/\n/g'<<<"$1"|sed -e '/^$/d' -e 's/^# //' } usage() { + export TEXTDOMAIN='librelib' + export TEXTDOMAINDIR='/usr/share/locale' . $(librelib messages) if [[ $# -eq 0 ]]; then print "Usage: %s [-h] COMMAND [ARGUMENTS]" "${0##*/}" @@ -135,7 +139,7 @@ if [[ "${0##*/}" == libreblacklist ]]; then } if [[ $# -eq 0 ]]; then - usage >/dev/stderr + usage >&2 exit 1 fi _blacklist_cmd=$1 |