ssh_port=$(git remote show origin | grep Fetch | grep 'ssh://' \
| awk -F'/' '{print $3}' | awk -F':' '{print $2}')
- if [ -z $ssh_url ]; then
+ if [ -z "$ssh_url" ]; then
echo "ERROR: Gerrit SSH URL not found."
exit 1
fi
# Groups must be mapped in the groups file before they can be used
if ! grep 'Registered Users'; then
echo -e "global:Registered-Users\tRegistered Users" >> groups
+ git add groups
fi
mode=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep branch | awk '{print $1}')