needed when building *only* myplc-native
[myplc.git] / build-native.sh
index d1888bb..bc4930b 100755 (executable)
@@ -18,8 +18,8 @@
 
 # Install configuration scripts
 echo "* myplc-native: Installing configuration scripts"
-tmpdir=$1
-mkdir -p ${tmpdir}
+pldistro=$1; shift
+tmpdir=$1 ; shift
 rm -rf ${tmpdir}
 mkdir -p ${tmpdir}
 echo "* myplc-native: installing plc_config.py in /usr/share/myplc"
@@ -44,16 +44,22 @@ echo "* myplc-native: Installing initscripts"
 find plc.d | cpio -p -d -u ${tmpdir}/etc/
 install -D -m 755 guest.init ${tmpdir}/etc/init.d/plc
 
+# fetch the release stamp from the build if any
+if [ -f ../../../myplc-release ] ; then
+  cp ../../../myplc-release myplc-release
+else
+  echo "Cannot find release information." > myplc-release
+  date >> myplc-release
+  echo "$HeadURL$" >> myplc-release
+fi
+# install it in /etc/myplc-release 
+install -m 444 myplc-release ${tmpdir}/etc/myplc-release
 
 # Install configuration file
 echo "* myplc: Installing configuration file"
 install -D -m 444 default_config.xml ${tmpdir}/etc/planetlab/default_config.xml
 install -D -m 444 plc_config.dtd ${tmpdir}/etc/planetlab/plc_config.dtd
 
-# Initialize node RPMs directory. The PlanetLab-Bootstrap.tar.bz2
-# tarball already contains all of the node RPMs pre-installed. Only
-# updates or optional packages should be placed in this directory.
-install -D -m 644 $pl_DISTRO_YUMGROUPS \
-    ${tmpdir}/var/www/html/install-rpms/planetlab/yumgroups.xml
+# yumgroups.xml and yum repo : let noderepo handle that
 
 exit 0