From 9fa3aeadfe162483e01f285c7fd4d5f0fb712c18 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Fri, 12 Aug 2011 09:51:28 +0200 Subject: Use bourne shell, fix error in previous commit Change-Id: Id2a304d5090eb2564c5d56ea260fa53b9b17d0d5 Reviewed-on: http://review.gluster.com/223 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- rfc.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'rfc.sh') diff --git a/rfc.sh b/rfc.sh index 1ee6d042..10679f6c 100755 --- a/rfc.sh +++ b/rfc.sh @@ -1,10 +1,10 @@ -#!/bin/bash -e +#!/bin/sh -e branch="master"; -function set_hooks_commit_msg() +set_hooks_commit_msg() { f=".git/hooks/commit-msg"; u="http://review.gluster.com/tools/hooks/commit-msg"; @@ -19,7 +19,7 @@ function set_hooks_commit_msg() } -function is_num() +is_num() { local num; @@ -29,7 +29,7 @@ function is_num() } -function rebase_changes() +rebase_changes() { git fetch; @@ -37,7 +37,7 @@ function rebase_changes() } -function editor_mode() +editor_mode() { if [ $(basename "$1") = "git-rebase-todo" ]; then sed 's/^pick /reword /g' "$1" > $1.new && mv $1.new $1; @@ -61,7 +61,7 @@ function editor_mode() fi sed -i "s/^\(Change-Id: .*\)$/\1\nBUG: $bug/g" $1 > $1.new && \ - mv $i.new $i + mv $1.new $1; return; done fi @@ -74,13 +74,13 @@ EOF } -function assert_diverge() +assert_diverge() { git diff origin/$branch..HEAD | grep -q .; } -function main() +main() { if [ -e "$1" ]; then editor_mode "$@"; -- cgit