diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-25 20:01:35 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-25 20:01:35 +0000 |
commit | a0a3762c9f5714e341df7b9417cb62223216f7ee (patch) | |
tree | 13939439e2a87ebf02b68b7f351ac9c327f82056 /encap/src/encap-profiles/m4-1.4.4.sh | |
parent | ac390d34e412474420a82d0f32e843cc529991dd (diff) | |
download | bcfg2-a0a3762c9f5714e341df7b9417cb62223216f7ee.tar.gz bcfg2-a0a3762c9f5714e341df7b9417cb62223216f7ee.tar.bz2 bcfg2-a0a3762c9f5714e341df7b9417cb62223216f7ee.zip |
EncapPackages: More shell portability changes for Solaris
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2114 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/encap-profiles/m4-1.4.4.sh')
-rwxr-xr-x | encap/src/encap-profiles/m4-1.4.4.sh | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/encap/src/encap-profiles/m4-1.4.4.sh b/encap/src/encap-profiles/m4-1.4.4.sh index 835036722..aeb950773 100755 --- a/encap/src/encap-profiles/m4-1.4.4.sh +++ b/encap/src/encap-profiles/m4-1.4.4.sh @@ -1,10 +1,13 @@ #!/bin/sh # $Id$ -ENCAP_PKGNAME=m4-1.4.4 -PATH=$PATH:/usr/local/bin +ENCAP_PKGNAME="m4-1.4.4" +PATH="$PATH:/usr/local/bin" export PATH +date > ${ENCAP_PKGNAME}.log + +if [ -f "${ENCAP_PKGNAME}.ep" ]; then rm ${ENCAP_PKGNAME}.ep; fi cat > ${ENCAP_PKGNAME}.ep << EOF <?xml version="1.0"?> @@ -25,7 +28,6 @@ cat > ${ENCAP_PKGNAME}.ep << EOF type="prepend" /> - <environment variable="PATH" value=":/usr/sfw/bin:/usr/ccs/bin" @@ -52,23 +54,46 @@ description m4 - GNU implementation of the traditional Unix macro processor </encap_profile> EOF +if [ -f m4-fake ]; then rm m4-fake; fi cat > m4-fake << EOF #!/bin/sh cat \$4 EOF - chmod 755 m4-fake -( ${MKENCAP} -m ${PWD}/m4-fake -b -DUP ${ENCAP_PKGNAME}.ep || true ) \ - > ${ENCAP_PKGNAME}.log 2>&1 +CURDIR="`pwd`" + +printf "Environment variables:\n" \ + >> ${ENCAP_PKGNAME}.log +env >> ${ENCAP_PKGNAME}.log + +printf "\nsrcdir:|%s| pwd:|%s| \$0:|%s|\n" "${srcdir}" "`pwd`" "$0" \ + >> ${ENCAP_PKGNAME}.log + +printf "\n%s :\n" "`ls -l ${ENCAP_PKGNAME}.ep`" \ + >> ${ENCAP_PKGNAME}.log +cat ${ENCAP_PKGNAME}.ep >> ${ENCAP_PKGNAME}.log + +printf "\n\n%s :\n" "`ls -l m4-fake`" \ + >> ${ENCAP_PKGNAME}.log +cat m4-fake >> ${ENCAP_PKGNAME}.log + +printf "\n${MKENCAP} -m ${CURDIR}/m4-fake -b -DUP ${ENCAP_PKGNAME}.ep :\n" \ + >> ${ENCAP_PKGNAME}.log +( ${MKENCAP} -m ${CURDIR}/m4-fake -b -DUP ${ENCAP_PKGNAME}.ep || true ) \ + >> ${ENCAP_PKGNAME}.log 2>&1 -( ${MKENCAP} -m ${PWD}/m4-fake -b -T ${ENCAP_PKGNAME}.ep || true ) \ - >> ${ENCAP_PKGNAME}.log 2>&1 +printf "\n${MKENCAP} -m ${CURDIR}/m4-fake -b -T ${ENCAP_PKGNAME}.ep :\n" \ + >> ${ENCAP_PKGNAME}.log +( ${MKENCAP} -m ${CURDIR}/m4-fake -b -T ${ENCAP_PKGNAME}.ep || true ) \ + >> ${ENCAP_PKGNAME}.log 2>&1 -( ${MKENCAP} -m ${PWD}/m4-fake -b -CBI ${ENCAP_PKGNAME}.ep ) \ - >> ${ENCAP_PKGNAME}.log 2>&1 +printf "\n${MKENCAP} -m ${CURDIR}/m4-fake -b -CBI ${ENCAP_PKGNAME}.ep :\n" \ + >> ${ENCAP_PKGNAME}.log +( ${MKENCAP} -m ${CURDIR}/m4-fake -b -CBI ${ENCAP_PKGNAME}.ep ) \ + >> ${ENCAP_PKGNAME}.log 2>&1 -rm m4-fake -rm ${ENCAP_PKGNAME}.ep +rm m4-fake >> ${ENCAP_PKGNAME}.log 2>&1 +rm ${ENCAP_PKGNAME}.ep >> ${ENCAP_PKGNAME}.log 2>&1 exit 0 |