cortex_m: deprecate soft_reset_halt
[openocd.git] / tools / initial.sh
1 #!/bin/sh
2 TOPDIR=`pwd`
3 USERNAME=$1
4
5 if [ "x$1" = "x" ] ; then
6 echo "Usage: $0 <Username>"
7 exit 1
8 fi
9
10 add_remote()
11 {
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"
18 fi
19 }
20
21 update_commit_msg()
22 {
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
32 fi
33 chmod a+x commit-msg
34 }
35
36 add_remote
37 update_commit_msg