#!/bin/sh BOOTLD=apex.bin KERNEL=zImage ROOTFS=nail-firmware.ext2.gz BOOTLD_NEW=$(find -maxdepth 1 -name "$BOOTLD.2008*" |grep -v config | sort | tail -n1) KERNEL_NEW=$(find -maxdepth 1 -name "$KERNEL.2008*" |grep -v config | sort | tail -n1) ROOTFS_NEW=$(find -maxdepth 1 -name "$ROOTFS.2008*" |grep -v config | sort | tail -n1) ln -fs $BOOTLD_NEW ${BOOTLD}.current ln -fs $KERNEL_NEW ${KERNEL}.current ln -fs $ROOTFS_NEW ${ROOTFS}.current