#!/bin/sh
# version 0.6

. installink.sh

. ./!vda_ver

ROOTFS=/app/$NAME$VER
STATIC=/usr/app/$NAME$VER

echo "*** Installing root fs files (stuff needed at early boot)"
echo
echo "This will install symlinks to ROOT FS $NAME$VER files"
echo "Note: this will crush any existing file in the way!"
echo -n "Press <Enter> to continue or Ctrl-C to exit: "; read junk

mkdir -p $ROOTFS

# copy this install script to root fs
cp -dpR "$0" "./!vda_ver" $ROOTFS

# symlink binaries
cp -dpR $STATIC/bin $ROOTFS
link_samename_strip	/bin		"$ROOTFS/bin/*"
#cp -dp $STATIC/sbin $ROOTFS
#link_samename_strip	/sbin		"$ROOTFS/sbin/*"

# symlink libs
#mkdir -p $ROOTFS/lib
#cp -dpR $STATIC/lib $ROOTFS
#ldconfig -n				"$ROOTFS/lib"
#link_samename		/lib		"$ROOTFS/lib/*.a"
#link_samename		/lib		"$ROOTFS/lib/*.so*"
#link_samename		/lib		"$ROOTFS/lib/*.la"
