JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}')
# Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z "${JOB_NAME//*/}" ]; then
+if [ -z "${JOB_NAME//\*/}" ]; then
echo "ERROR: JOB_NAME cannot be empty or '*'."
exit 1
fi
user=$(echo "$CREDENTIAL" | cut -f1 -d:)
pass=$(echo "$CREDENTIAL" | cut -f2 -d:)
-echo "machine $machine login $user password $pass" > ~/.netrc
+echo "machine ${machine%:*} login $user password $pass" > ~/.netrc
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>