#!/bin/sh
# version 0.7

. ./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 install scripts to root fs
cp -dp			"$0" "./!vda_ver"	$ROOTFS

# copy and symlink binaries
cp -dpR			$STATIC/command	$ROOTFS
link_samename_strip	/bin		"$ROOTFS/command/*"

## copy and 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"
