summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-25 10:58:08 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-25 10:58:08 -0400
commit77bc923a5ae972bd7d212ae90a76180f68176de0 (patch)
tree4686c9536c335531488e1889164660ae1e96a064 /src
parenta4e500ddc913f7ed9d56e64339b5acdac78a2a56 (diff)
move librefetch:print() to libremessages:print()
Diffstat (limited to 'src')
-rwxr-xr-xsrc/librefetch/librefetch10
-rwxr-xr-xsrc/libremessages8
2 files changed, 8 insertions, 10 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index d09c57b..1d4dd5c 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -293,14 +293,4 @@ modified_srcbuild() {
printf '%s\n' "$new"
}
-# "Library" crap ###############################################################
-
-print() {
- local fmt=$1
- shift
- printf -- "$(gettext "$fmt")\n" "$@"
-}
-
-################################################################################
-
main "$@"
diff --git a/src/libremessages b/src/libremessages
index 7ef5dfb..3910c94 100755
--- a/src/libremessages
+++ b/src/libremessages
@@ -39,6 +39,14 @@ export TEXTDOMAINDIR='/usr/share/locale'
# Own functions #
################################################################################
+# Usage: print fmt arg1 arg2...
+# Like printf, but gettext-aware, and prints a trailing newline
+print() {
+ local fmt=$1
+ shift
+ printf -- "$(gettext "$fmt")\n" "$@"
+}
+
# Usage: term_title This will be the term title
# Sets the terminal title
term_title() {