summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-03-02 10:05:49 +0100
committerPavel Raiskup <praiskup@redhat.com>2015-03-02 10:11:07 +0100
commit4dcf043cc8d1b4d99c64418958329c5f882f4034 (patch)
tree417541bdae4f5e73bed81235be923d4d782fb427
parent7b1dbe74c98f5be41ad5605260f0edbf40a9fcd1 (diff)
downloadpostgresql-setup-4dcf043cc8d1b4d99c64418958329c5f882f4034.zip
postgresql-setup-4dcf043cc8d1b4d99c64418958329c5f882f4034.tar.gz
postgresql-setup-4dcf043cc8d1b4d99c64418958329c5f882f4034.tar.xz
move library functions into library.sh
* postgresql-setup.in (die, error, error_q, warn, warn_q, info) (info_q, debug, set_var, root_prereq): Move to .. * share/postgresql-setup/library.sh.in: .. here.
-rw-r--r--postgresql-setup.in22
-rw-r--r--share/postgresql-setup/library.sh.in22
2 files changed, 22 insertions, 22 deletions
diff --git a/postgresql-setup.in b/postgresql-setup.in
index 5c1f08a..8267c06 100644
--- a/postgresql-setup.in
+++ b/postgresql-setup.in
@@ -85,28 +85,6 @@ Environment:
debugging output."
-die() { echo >&2 $"FATAL: $@" ; exit 1 ; }
-error() { echo >&2 $"ERROR: $@" ; }
-error_q() { echo >&2 $" $@" ; }
-warn() { echo >&2 $"WARNING: $@" ; }
-warn_q() { echo >&2 $" $@" ; }
-info() { echo >&2 $" * $@" ; }
-info_q() { echo >&2 $" $@" ; }
-debug() { test "$option_debug" = "1" && echo >&2 $"DEBUG: $@"; }
-
-
-set_var()
-{
- eval "$1=\"$2\""
-}
-
-
-root_prereq()
-{
- test "$(id -u)" -eq 0 || die "$0 requires root access for this action"
-}
-
-
print_version()
{
echo "@NAME_BINARYBASE@-setup @VERSION@"
diff --git a/share/postgresql-setup/library.sh.in b/share/postgresql-setup/library.sh.in
index 32c8036..fe38f6c 100644
--- a/share/postgresql-setup/library.sh.in
+++ b/share/postgresql-setup/library.sh.in
@@ -1,3 +1,25 @@
+die() { echo >&2 $"FATAL: $@" ; exit 1 ; }
+error() { echo >&2 $"ERROR: $@" ; }
+error_q() { echo >&2 $" $@" ; }
+warn() { echo >&2 $"WARNING: $@" ; }
+warn_q() { echo >&2 $" $@" ; }
+info() { echo >&2 $" * $@" ; }
+info_q() { echo >&2 $" $@" ; }
+debug() { test "$option_debug" = "1" && echo >&2 $"DEBUG: $@"; }
+
+
+set_var()
+{
+ eval "$1=\"$2\""
+}
+
+
+root_prereq()
+{
+ test "$(id -u)" -eq 0 || die "$0 requires root access for this action"
+}
+
+
read_config_file()
{
local key="" val=""