summaryrefslogtreecommitdiffstats
path: root/encap
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-25 20:01:35 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-08-25 20:01:35 +0000
commita0a3762c9f5714e341df7b9417cb62223216f7ee (patch)
tree13939439e2a87ebf02b68b7f351ac9c327f82056 /encap
parentac390d34e412474420a82d0f32e843cc529991dd (diff)
downloadbcfg2-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')
-rw-r--r--encap/src/encap-profiles/Makefile2
-rwxr-xr-xencap/src/encap-profiles/m4-1.4.4.sh49
2 files changed, 38 insertions, 13 deletions
diff --git a/encap/src/encap-profiles/Makefile b/encap/src/encap-profiles/Makefile
index e2f57ea8e..c79c729d6 100644
--- a/encap/src/encap-profiles/Makefile
+++ b/encap/src/encap-profiles/Makefile
@@ -125,7 +125,7 @@ all : install encaps rename
.DELETE_ON_ERROR : # delete the target of a rule if it has changed and its
# commands exit with a nonzero exit status
-install : $(EPKG) $(MKENCAP) $(EP2TARGET) $(addsuffix .installed,$(sources))
+install : $(EPKG) $(MKENCAP) $(EP2TARGET) $(M4).installed $(addsuffix .installed,$(sources))
encaps : $(EPKG) $(MKENCAP) $(EP2TARGET) $(addsuffix .packaged,$(sources))
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