diff options
Diffstat (limited to 'src/abslibre-tools/libreaddiff')
-rwxr-xr-x | src/abslibre-tools/libreaddiff | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index 03d0ad0..ebd749d 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -23,10 +23,12 @@ check_vars libretools WORKDIR for arg in "$@" ; do case "$arg" in -h|--h|--he|--hel|--help|-\?) - echo 'Usage: libreaddiff repo [arch] - -This script outputs a diff of package names and versions in repo -between pacman'\''s sync db and abslibre checkout.' >&2 + { + print 'Usage: %s repo [arch]' "${0##*/}" + echo + prose "This script outputs a diff of package names and versions + in repo between pacman's sync db and abslibre checkout." + } >&2 exit 0 ;; esac @@ -72,14 +74,14 @@ except StopIteration: load_PKGBUILD "$f/PKGBUILD" || continue is_here=false for arc in ${arch[@]} ; do - if [ "$arc" = "any" -o "$arc" = "$CARCH" ] ; then + if [[ "$arc" == "any" ]] || [[ "$arc" == "$CARCH" ]] ; then is_here=true break fi done - if [ "$is_here" = "true" ] ; then - for name in ${pkgname[@]} ; do - if [ -z "$epoch" ] ; then + if [[ "$is_here" == "true" ]] ; then + for name in "${pkgname[@]}" ; do + if [[ -z "$epoch" ]] ; then echo $name-$pkgver-$pkgrel else echo $name-$epoch:$pkgver-$pkgrel |