diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-05 11:36:36 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-05 11:36:36 -0500 |
commit | 15ba4736d7888b41b74e7f683a0ee0521b7681f7 (patch) | |
tree | 71be267663f9b1a29eca1afa91e976163ebaf96c /src/repo-diff | |
parent | cb9e36694cb02b7190d806fc41e7e3927aabedbd (diff) |
repo-diff: use libremessages
Diffstat (limited to 'src/repo-diff')
-rwxr-xr-x | src/repo-diff | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/repo-diff b/src/repo-diff index bfa1968..e15080a 100755 --- a/src/repo-diff +++ b/src/repo-diff @@ -1,15 +1,19 @@ #!/usr/bin/env bash # Shows a diff between repo databases -if test $# -eq 0; then - printf "$(gettext "Compares two repo databases using distro/repo/architecture format - -Usage: -\t%s arch/core/i686 parabola/core/i686 +. libremessages + +usage() { + print "Usage: %s arch/core/i686 parabola/core/i686" "${0##*/}" + print "Compares two repo databases using distro/repo/architecture format." + echo + print 'Shortcuts:' + flag 'arch' 'expands to Arch Linux repo url' + flag 'parabola' 'expands to Parabola GNU/Linux-libre repo url' +} -Shortcuts: -\tarch \texpands to archlinux repo url repo -\tparabola\texpands to parabola repo url\n")" ${0##*/} +if test $# -eq 0; then + usage exit 0 fi @@ -44,11 +48,11 @@ done { printf "$(gettext "Difference between %s and %s")\n---\n" $1 $2 - which diffstat &>/dev/null && diff -auN ${d[@]} | diffstat + which diffstat &>/dev/null && diff -auN "${d[@]}" | diffstat diff -auN "${d[@]}" } >../${n}.diff popd >/dev/null rm -r ${0##*/}.$$ -printf "$(gettext "Difference save on %s")\n" ${n}.diff +print "Difference save on %s" "${n}.diff" |