3 #PATH=/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin
4 #*/5 * * * * huxs /bin/sh /opt/galaxy/git/12306_ticket_helper_iccfish/cronupd.sh 2>&1 >/opt/galaxy/git/12306_ticket_helper_iccfish/uplog.user
6 export GIT_AUTHOR_NAME
="Galaxy"
7 export GIT_AUTHOR_EMAIL
=galaxy001@gmail.com
8 export GIT_COMMITTER_NAME
="$GIT_AUTHOR_NAME"
9 export GIT_COMMITTER_EMAIL
="$GIT_AUTHOR_EMAIL"
14 cd /opt
/galaxy
/git
/12306_ticket_helper_iccfish
/
15 mv 12306_ticket_helper.user.js
12306_ticket_helper.user.js.old
16 mv version.js version.js.old
17 mv 12306_ticket_helper.crx
12306_ticket_helper_last.crx
18 wget
-S http
://www.fishlee.net
/service
/update
/44/version.js
-o updatetime.log
19 wget
-S http
://www.fishlee.net
/Service
/Download.ashx
/44/47/12306_ticket_helper.user.js
-a updatetime.log
20 wget
-S http
://www.fishlee.net
/Service
/Download.ashx
/44/63/12306_ticket_helper.crx
-a updatetime.log
22 THEVER
=`sha1sum 12306_ticket_helper.user.js`
23 # 4.5.0 @ 2013-01-26 18:15:56 CST
24 #echo $THEVER|awk '{print $1}' > now.ver.user
25 DATETIME
=`date +%F-%H%M%S`
26 THEVER
=${DATETIME}_
${THEVER}
27 JUSTVER
=`echo ${THEVER}|awk '{gsub(/\./,"");print $1}'`
29 cmp 12306_ticket_helper.user.js
12306_ticket_helper.user.js.old
31 unzip -oDDd chrome.new
12306_ticket_helper.crx
39 mv 12306_ticket_helper.crx bak
/12306_ticket_helper_
${JUSTVER}.crx
40 git add bak
/12306_ticket_helper_
${JUSTVER}.crx
41 git commit .
-m "$THEVER" --author='Galaxy <galaxy001@gmail.com>'
43 echo "Updated: $THEVER"