summaryrefslogtreecommitdiff
path: root/examples/create_spool_message.sh
blob: 22c583956d78a9fb7e7c3e90e112d75841c6e7d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 $@