#!/system/bin/sh

/system/xbin/mount /dev/block/mmcblk0p1 /mnt/sdcard

if [ -f /mnt/sdcard/boot.scr ]; then
    ## backup any existing scripts
    cp -f /mnt/sdcard/boot.scr /mnt/sdcard/boot.scr-recoverybak
fi

cp -f /system/pseudorec/boot.scr /mnt/sdcard/
cp -f /system/pseudorec/recovery-uboot.img /mnt/sdcard/
cp -f /system/pseudorec/recovery-kernel /mnt/sdcard/recovery-kernel
sync

umount /mnt/sdcard
