summaryrefslogtreecommitdiffstats
path: root/encap/src/encap-profiles
diff options
context:
space:
mode:
Diffstat (limited to 'encap/src/encap-profiles')
-rw-r--r--encap/src/encap-profiles/Makefile2
-rwxr-xr-xencap/src/encap-profiles/ep2target9
2 files changed, 7 insertions, 4 deletions
diff --git a/encap/src/encap-profiles/Makefile b/encap/src/encap-profiles/Makefile
index 13d3b2135..e2f57ea8e 100644
--- a/encap/src/encap-profiles/Makefile
+++ b/encap/src/encap-profiles/Makefile
@@ -133,7 +133,7 @@ rename : encaps
if [ "$(OS)x" != "x" ]; then OS="$(OS)"; fi && \
if [ "$${OS}x" != "x" ]; then \
for OLDNAME in `ls ./*-encap-*.tar.gz`; do \
- NEWNAME="`printf $${OLDNAME} \
+ NEWNAME="`printf "%s\n" "$${OLDNAME}" \
| awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' \
| sed s:\ :-:g | sed s:OSDIST:\$${OS}:g`" ; \
if [ "$${OLDNAME}x" != "$${NEWNAME}x" ]; then \
diff --git a/encap/src/encap-profiles/ep2target b/encap/src/encap-profiles/ep2target
index 1fc8dc816..ee0c8b4e4 100755
--- a/encap/src/encap-profiles/ep2target
+++ b/encap/src/encap-profiles/ep2target
@@ -1,16 +1,19 @@
#!/bin/sh
+# Note: Solaris sed(1) requires a newline from stdin
SED="sed"
#SED="/opt/csw/bin/gsed"
+#SED="/usr/xpg4/bin/sed"
+#SED="/usr/ucb/sed"
chomp() {
- printf "$1" | ${SED} 's:^\ ::g' | ${SED} 's:\ $::g'
+ printf "%s\n" "$1" | ${SED} 's:^\ ::g' | ${SED} 's:\ $::g'
}
cname() {
unset CTMP1 CTMP2
- for PART in `printf "$1" | ${SED} 's:-:\ :g'`; do
- if [ ! "`printf $PART | cut -c1 | ${SED} 's:[0-9]:0:g'`x" = "0x" ]; then
+ for PART in `printf "%s\n" "$1" | ${SED} 's:-:\ :g'`; do
+ if [ ! "`printf "%s\n" "$PART" | cut -c1 | ${SED} 's:[0-9]:0:g'`x" = "0x" ]; then
CTMP1="${CTMP1} ${PART}"
fi
done