2012年6月19日 星期二

[xdotool][cp] The script of Download code - version 20120620


[xdotool][cp] The script of Download code - version 20120620



#!/bin/bash

# cp file from A place to tftp

DATE=`date +%m%e`

Comannd='set'

Parameter='UBFINAME1 '

Filename='dgwsdk-3.5.0.24-12'$DATE'.img'

Directory=`date +%Y%m%d`

echo $SetFileName

cp -a  /home/freeman/111.2.1.44/$Directory/UBEE_D3_CableRG/build/dgwsdk/images/$Filename /home/freeman/tftp/

chmod 777 ./$Filename



# change ifconfig eth0 IP address

sudo ifconfig eth1 192.168.100.20

ifconfig

sleep 1



#use xdotool finish download code into board



xdotool key alt+1

xdotool type 'set serverip 192.168.100.20'

xdotool key 'Return'

sleep 0.1



xdotool type $Comannd

xdotool key space

xdotool type $Parameter

xdotool key space

xdotool type $Filename

xdotool key 'Return'

sleep 0.1

xdotool type 'run update1'

xdotool key 'Return'

Related Posts:

0 意見:

張貼留言