summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-21 15:17:46 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-21 15:17:46 -0400
commit745d32b1aa0b36ed74b8a34ff4d6843b51f7b9f0 (patch)
treef8ff7a8bf923f82781b9b7c080734df86a14094c /src
parent93164e46342883e70e84688ae7252cbce47e4281 (diff)
abslibre-tools: internationalize
Diffstat (limited to 'src')
-rwxr-xr-xsrc/abslibre-tools/createworkdir6
-rwxr-xr-xsrc/abslibre-tools/diff-unfree16
-rwxr-xr-xsrc/abslibre-tools/libreaddiff10
-rwxr-xr-xsrc/abslibre-tools/librerelease12
-rwxr-xr-xsrc/abslibre-tools/librestage14
5 files changed, 29 insertions, 29 deletions
diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir
index e98da3e..59cb0f3 100755
--- a/src/abslibre-tools/createworkdir
+++ b/src/abslibre-tools/createworkdir
@@ -28,9 +28,9 @@ check_vars libretools WORKDIR REPOS ABSLIBREGIT || exit 1
[[ ! -d ${WORKDIR} ]] && { # Create the WORKDIR
- msg "Creating WORKDIR on ${WORKDIR}"
+ msg "Creating WORKDIR on %s" "${WORKDIR}"
mkdir -p ${WORKDIR} ||{
- error "Could not create ${WORKDIR}"; exit 1
+ error "Could not create %s" "${WORKDIR}"; exit 1
}
}
@@ -39,7 +39,7 @@ for _repo in "${REPOS[@]}"; do # Create the staging dirs
[[ ! -d ${WORKDIR}/staging/${_repo} ]] && {
mkdir -p ${WORKDIR}/staging/${_repo} || {
- error "Can't create ${WORKDIR}/staging/${_repo}"
+ error "Can't create %s" "${WORKDIR}/staging/${_repo}"
exit 1
}
}
diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree
index 59fcbae..b143a99 100755
--- a/src/abslibre-tools/diff-unfree
+++ b/src/abslibre-tools/diff-unfree
@@ -25,14 +25,12 @@
load_files libretools
check_vars libretools DIFFTOOL || exit 1
-cmd=${0##*/}
-
usage() {
- echo "Usage: $cmd [community|packages] [unfree-package] [repo]"
- echo "Usage: $cmd --help"
- echo "Helps you diff build scripts from ABSLibre against (Unfree) ABS."
- echo ""
- echo "Package name and repo will we guessed if you don't specify them."
+ print "Usage: %s [community|packages] [unfree-package] [repo]" "${0##*/}"
+ print "Usage: %s --help" "${0##*/}"
+ prose "Helps you diff build scripts from ABSLibre against (Unfree) ABS."
+ echo
+ prose "Package name and repo will we guessed if you don't specify them."
}
main() {
@@ -68,7 +66,7 @@ main() {
pushd "${tmp_dir}" &>/dev/null
- msg "Getting diff from $repo/$package..."
+ msg "Getting diff from %s..." "$repo/$package"
svn checkout --depth=empty svn://svn.archlinux.org/$svnrepo &>/dev/null
@@ -81,7 +79,7 @@ main() {
msg "Diffing files"
for _file in ${unfree_dir}/*; do
- msg2 "$(basename "${_file}")"
+ msg2 "%s" "$(basename "${_file}")"
${DIFFTOOL} "$PWD/$(basename "${_file}")" "${_file}"
done
}
diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff
index e31cc7b..dde16b3 100755
--- a/src/abslibre-tools/libreaddiff
+++ b/src/abslibre-tools/libreaddiff
@@ -22,10 +22,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
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index 286896a..9278a32 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -41,14 +41,14 @@
usage() {
print "Usage: %s [OPTIONS]" "${0##*/}"
echo
- print 'This script uploads packages on $WORKDIR/stagging'
- print "to parabola server."
+ prose 'This script uploads packages on $WORKDIR/stagging
+ to parabola server.'
echo
print "Options:"
- print ' -c Clean packages on $WORKDIR/staging'
- print " -l Only list packages but not upload them"
- print " -n Dry-run; don't actually do anything"
- print " -h Show this message"
+ flag '-c' 'Clean packages on $WORKDIR/staging'
+ flag '-l' "Only list packages but not upload them"
+ flag '-n' "Dry-run; don't actually do anything"
+ flag '-h' "Show this message"
}
list_packages() {
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index b85878b..96e60ff 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -23,14 +23,13 @@
. libremessages
. $(librelib conf.sh)
-cmd=${0##*/}
usage() {
- print "Usage: %s REPO [REPO2 REPO3...]" "$cmd"
+ print "Usage: %s REPO [REPO2 REPO3...]" "${0##*/}"
print "Stages the package(s) build by ./PKGBUILD for upload."
echo
- print "The package(s) are staged for the named repositories."
- print "It is in general a bad idea to stage a package on multiple"
- print "repositories, but it supported by this tool."
+ prose "The package(s) are staged for the named repositories.
+ It is in general a bad idea to stage a package on multiple
+ repositories, but it supported by this tool."
}
main() {
@@ -67,7 +66,8 @@ main() {
# Now for the main routine.
staged=false
- slock 10 "${WORKDIR}/staging.lock" 'Waiting for a shared lock on the staging directory'
+ slock 10 "${WORKDIR}/staging.lock" \
+ 'Waiting for a shared lock on the staging directory'
for CARCH in "${ARCHES[@]}" any; do
for _pkgname in "${pkgname[@]}"; do
pkgfile=${_pkgname}-$(get_full_version $_pkgname)-${CARCH}${PKGEXT}
@@ -79,7 +79,7 @@ main() {
pkgpath="$(readlink -f "$pkgpath")"
fi
- msg "Found ${pkgfile}"
+ msg 'Found %s' "${pkgfile}"
canonical="" # is empty for the first iteration, set after that
for repo in "${repos[@]}"; do