flash/nor/core, target: don't ask for working mem if no target algo
[openocd.git] / tools / initial.sh
blobeafc9c13872c42e689ec597ffb0d503b97991f6c
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@review.openocd.org:29418/openocd.git
15 git config remote.review.push HEAD:refs/for/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 https://review.openocd.org/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