diff options
Diffstat (limited to 'examples/create_spool_message.sh')
-rwxr-xr-x | examples/create_spool_message.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/create_spool_message.sh b/examples/create_spool_message.sh new file mode 100755 index 0000000..22c5839 --- /dev/null +++ b/examples/create_spool_message.sh @@ -0,0 +1,30 @@ +#!/bin/sh + + + +##function +write_message(){ + + orev=${3:-"a1b2c3d4e5f6"} + nrev=${4:-"9a8b7c6d5e4f"} + + + cat <<EOF +--- +m_id: 123456 +m_repo: $1 +m_branch: $2 +m_oldrev: $orev +m_newrev: $nrev +... +EOF + +} + + +if [ $# -le 1 ]; then + echo "Usage: $0 <repo> <branch> [<oldrev> [<newrev]]" + exit 1 +fi + +write_message $@ |