cfg: add basic support of Freescale i.MX6 series targets
[openocd.git] / tools / initial.sh
blob9580c9a9c481efdaf0e90e40bd744bbd81dc26bd
1 #!/bin/sh
2 TOPDIR=`pwd`
3 USERNAME=$1
5 if [ "x$1" = "x" ] ; then
6 echo "Usage: $0 <Username>"
7 exit 1
8 fi
10 add_remote()
12 remote_exist=`grep remote .git/config | grep review | wc -l`
13 if [ "x$remote_exist" = "x0" ] ; then
14 git remote add review ssh://$USERNAME@openocd.zylin.com:29418/openocd.git
15 git config remote.review.push HEAD:refs/publish/master
16 else
17 echo "Remote review exists"
21 update_commit_msg()
23 cd "${TOPDIR}/.git/hooks"
24 save_file=commit-msg-`date +%F-%T`
25 mv commit-msg $save_file
26 printf "%-30s" "Updating commit-msg"
27 status="OK"
28 wget -o log http://openocd.zylin.com/tools/hooks/commit-msg || status="FAIL"
29 echo $status
30 if [ $status = "FAIL" ] ; then
31 mv $save_file commit-msg
33 chmod a+x commit-msg
36 add_remote
37 update_commit_msg