signed-commit remote shell (see also https://github.com/dyne/scorsh)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scorsh/examples/create_spool_message.sh

31 lines
333 B

#!/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 $@