summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/repo-diff24
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"