summaryrefslogtreecommitdiff
path: root/examples/create_spool_message.sh
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-07-15 01:26:39 +0100
committerKatolaZ <katolaz@freaknet.org>2017-07-15 01:26:39 +0100
commit726b399e4747032a3d052339cd62c57ae5b6767c (patch)
treeaac8350e83bb13e9628dd287ca3aae97ecafcb32 /examples/create_spool_message.sh
parented637037b75cb5dfe1b49e776956fa6ab3632b68 (diff)
pipeline from spool to worker is done -- added examples
Diffstat (limited to 'examples/create_spool_message.sh')
-rwxr-xr-xexamples/create_spool_message.sh30
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 $@