summaryrefslogtreecommitdiff
path: root/scripts/deploy.sh
blob: 00a2b133ebc32e5b019f06f7d66ca4789394f7c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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