diff options
author | jbj <devnull@localhost> | 1999-04-18 19:01:46 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-04-18 19:01:46 +0000 |
commit | c67e60d5e793ef2ba0f3327aa13e7cf693196d6e (patch) | |
tree | 2a44d974c33e98ecfe3f41727997d9aaec368506 /scripts | |
parent | 3b9ca6b62e66d2e92160e0aa7ecf415fe499d575 (diff) | |
download | rpm-c67e60d5e793ef2ba0f3327aa13e7cf693196d6e.tar.gz rpm-c67e60d5e793ef2ba0f3327aa13e7cf693196d6e.tar.bz2 rpm-c67e60d5e793ef2ba0f3327aa13e7cf693196d6e.zip |
convert per-system configuration in /etc/rpmrc to macros.
CVS patchset: 3012
CVS date: 1999/04/18 19:01:46
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/convertrpmrc.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/convertrpmrc.sh b/scripts/convertrpmrc.sh index ad8acf831..2422e43e5 100644 --- a/scripts/convertrpmrc.sh +++ b/scripts/convertrpmrc.sh @@ -1,6 +1,9 @@ #!/bin/sh - +# +# Convert per-system configuration in /etc/rpmrc to macros in /etc/rpm/macros. +# # prereq: awk fileutils textutils sh-utils mktemp +# RPMRC=/etc/rpmrc MACROS=/etc/rpm/macros @@ -11,14 +14,14 @@ MACROS=/etc/rpm/macros [ -f $RPMRC ] || exit 0 [ -f $MACROS ] && { - echo "$MACROS already exists 1>&2 + echo "$MACROS already exists" 1>&2 exit 1 } DIRN="`dirname $MACROS`" [ -d "$DIRN" ] || mkdir -p "$DIRN" [ -d "$DIRN" ] || { - echo "$DIRN doesn't exist" + echo "could not create directory $DIRN" 1>&2 exit 1 } @@ -70,7 +73,6 @@ awk 'BEGIN { { for (str in xlate) { ms = "^" str ":" - print str >> "blah" if (match($1, ms)) { if (xlate[str]) { sub(ms, "%" xlate[str] " ") |