diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-25 18:02:15 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-25 18:02:15 +0000 |
commit | ac390d34e412474420a82d0f32e843cc529991dd (patch) | |
tree | fea9923b01e6a2d8ba00e07a07f56f966d4b2108 /encap | |
parent | b48a91771393816d04f4c31627e577c186ce8387 (diff) | |
download | bcfg2-ac390d34e412474420a82d0f32e843cc529991dd.tar.gz bcfg2-ac390d34e412474420a82d0f32e843cc529991dd.tar.bz2 bcfg2-ac390d34e412474420a82d0f32e843cc529991dd.zip |
EncapPackages: Solaris sed(1) requires newline from stdin
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2113 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap')
-rw-r--r-- | encap/src/bcfg2-site/Makefile | 2 | ||||
-rw-r--r-- | encap/src/encap-profiles/Makefile | 2 | ||||
-rwxr-xr-x | encap/src/encap-profiles/ep2target | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/encap/src/bcfg2-site/Makefile b/encap/src/bcfg2-site/Makefile index 1f9063d9e..52b688a13 100644 --- a/encap/src/bcfg2-site/Makefile +++ b/encap/src/bcfg2-site/Makefile @@ -33,7 +33,7 @@ copy : fill EN=`cat bcfg2-site-RENAME/encapname.out` && \ ( test ! -d $(ED)/bcfg2-site-$${EN} || rm -rf $(ED)/bcfg2-site-$${EN} ) && \ for SRC in `find bcfg2-site-RENAME | grep -v svn | grep -v tmpl`; do \ - DEST=$(ED)/`printf "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \ + DEST=$(ED)/`printf "%s\n" "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \ if [ -d $$SRC ]; then mkdir $$DEST; else cp $$SRC $$DEST; fi; \ done 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 |