summaryrefslogtreecommitdiffstats
path: root/encap/src/makeself-dist
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-09-05 01:04:08 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-09-05 01:04:08 +0000
commite1f3dd033ea86163eb97f8779d978d4ba80de93b (patch)
tree9031e8bdd9e90227b99ec707dbd9b586ce8511ea /encap/src/makeself-dist
parent1162b027d262192aafcbc3ae596a916490ee1a78 (diff)
downloadbcfg2-e1f3dd033ea86163eb97f8779d978d4ba80de93b.tar.gz
bcfg2-e1f3dd033ea86163eb97f8779d978d4ba80de93b.tar.bz2
bcfg2-e1f3dd033ea86163eb97f8779d978d4ba80de93b.zip
EncapPackages: Solaris does have a working expr, in /usr/ucb.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2199 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/makeself-dist')
-rwxr-xr-xencap/src/makeself-dist/makedist.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/encap/src/makeself-dist/makedist.sh b/encap/src/makeself-dist/makedist.sh
index 2a6445d9e..385bd5b18 100755
--- a/encap/src/makeself-dist/makedist.sh
+++ b/encap/src/makeself-dist/makedist.sh
@@ -82,8 +82,10 @@ cp $BSDIR/$BCFG2_SITE $DISTDIR
# Create setup.sh in $DISTDIR
if [ "`uname`x" = "SunOSx" ]; then
printf "#!/bin/ksh\n\n" > $DISTDIR/setup.sh
+ EXPR="/usr/ucb/expr"
else
printf "#!/bin/sh\n\n" > $DISTDIR/setup.sh
+ EXPR="expr"
fi
######################################################################
cat >> $DISTDIR/setup.sh << EOF
@@ -197,13 +199,13 @@ fi
# Sed quoting function - quote the &, :, ' and \ characters
sedquote() {
i=1
- while [ \$i -le \`expr length \$1\` ]; do
- c=\`expr substr \$1 \$i 1\`
+ while [ \$i -le \`${EXPR} length \$1\` ]; do
+ c=\`${EXPR} substr \$1 \$i 1\`
if [ "\${c}x" = "&x" -o "\${c}x" = ":x" -o "\${c}x" = "'x" -o "\${c}x" = "\\\\x" ]; then
c=\\\\\${c}
fi
printf "%s" "\$c"
- i=\`expr \$i + 1\`
+ i=\`${EXPR} \$i + 1\`
done
}