#!/bin/bash # copyies the latest jffs2 and uImage to the # remote=$1 flashdir=/var/volatile/flash-upgrade if ((${#remote} == 0)) ; then echo must have the name or address of the remote Conduit echo usage example: echo deploy.sh root@image0 exit 1 fi fs=$(ls -t *.jffs2 | head -1) kern=$(ls -t uImage--*.bin | head -1) ssh "$1" mkdir $flashdir ssh -t "$1" "touch /var/volatile/do_flash_upgrade; [[ -x /usr/bin/sudo ]] && sudo chown root /var/volatile/do_flash_upgrade" scp $kern "$1":$flashdir/uImage.bin scp $fs "$1":$flashdir/rootfs.jffs2