summaryrefslogtreecommitdiffstats
path: root/encap/bcfg2-libgcc-0.1.sh
diff options
context:
space:
mode:
authorDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-07-09 20:39:58 +0000
committerDaniel Joseph Barnhart Clark <dclark@pobox.com>2006-07-09 20:39:58 +0000
commita2c95fd54ba85609df061ea917af82f6b62e41ab (patch)
treea5c0d03a84b4491ca93bbf30af4e55670c39a5b2 /encap/bcfg2-libgcc-0.1.sh
parent9390a1f22db576e24b788496e965cdeada5392f6 (diff)
downloadbcfg2-a2c95fd54ba85609df061ea917af82f6b62e41ab.tar.gz
bcfg2-a2c95fd54ba85609df061ea917af82f6b62e41ab.tar.bz2
bcfg2-a2c95fd54ba85609df061ea917af82f6b62e41ab.zip
Initial checkin of bcfg2-encap-boostrap code to mcs svn.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1917 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/bcfg2-libgcc-0.1.sh')
-rwxr-xr-xencap/bcfg2-libgcc-0.1.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/encap/bcfg2-libgcc-0.1.sh b/encap/bcfg2-libgcc-0.1.sh
new file mode 100755
index 000000000..d6de6c471
--- /dev/null
+++ b/encap/bcfg2-libgcc-0.1.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $Id$
+
+# Creates encap of libgcc libraries from build machine so other machines
+# don't need to have gcc installed, or in the case of GNU/Linux so we're
+# using a consistant libgcc version everywhere.
+
+ENCAP_SOURCE=${ENCAPDIR}
+ENCAP_PKGNAME=bcfg2-libgcc-0.1
+PATH=$PATH:/usr/local/bin
+export PATH
+
+if [ "${ENCAP_SOURCE}x" = "x" ]; then
+ printf "Error in ${ENCAP_PKGNAME}.sh : ENCAPDIR not set, exiting...\n"
+ exit 1
+fi
+
+umask 022
+
+CXXBASE=`which gcc | xargs dirname | xargs dirname`
+for LIB in `cd ${CXXBASE} && find lib | grep libgcc`; do
+ cd ${CXXBASE}
+ LIBDIR=`dirname ${LIB}`
+ NEWDIR=${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2/${LIBDIR}
+ if [ ! -d ${NEWDIR} ]; then mkdir -p ${NEWDIR}; fi
+ cp -p ${LIB} ${NEWDIR}
+done
+
+SDIR=${ENCAP_SOURCE}/${ENCAP_PKGNAME}/var/encap
+mkdir -p ${SDIR}
+touch ${SDIR}/${ENCAP_PKGNAME}
+
+exit 0
+