Permalink
Browse files

Change regex to wildcard in tests to make cygwin happy.

  • Loading branch information...
1 parent 7d2b312 commit 1b705d2218594eaea70da7dd266fdeda375bcf5c @convissor convissor committed Nov 11, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 2-to-github.sh
View
10 2-to-github.sh
@@ -81,20 +81,20 @@ response=`curl -s -S $api/repos/pear/$package`
if [ $? -ne 0 ] ; then
echo "ERROR: curl had problem calling GitHub search API."
exit 1
-elif [[ $response =~ .*"Not Found".* ]] ; then
+elif [[ $response == *'"Not Found"'* ]] ; then
# Repository not there yet; create it in the pear-dev team.
post="{\"name\":\"$package\", \"homepage\":\"http://pear.php.net/package/$package\", \"team_id\":83068, \"has_issues\":false, \"has_wiki\":false}"
response=`curl -s -S -u "$user:$pass" -d "$post" $api/orgs/pear/repos`
if [ $? -ne 0 ] ; then
echo "ERROR: curl had problem calling GitHub create API."
exit 1
- elif [[ $response =~ .*"message".* ]] ; then
+ elif [[ $response == *'"message"'* ]] ; then
# The API returned some other error.
echo "GitHub API create ERROR: $response"
exit 1
fi
-elif [[ $response =~ .*"message".* ]] ; then
+elif [[ $response == *'"message"'* ]] ; then
# The API returned some other error.
echo "GitHub API search ERROR: $response"
exit 1
@@ -108,7 +108,7 @@ response=`curl -s -S -u "$user:$pass" -d "$post" $api/repos/pear/$package/hooks`
if [ $? -ne 0 ] ; then
echo "ERROR: curl had problem calling GitHub email hooks API."
exit 1
-elif [[ $response =~ .*"errors".* ]] ; then
+elif [[ $response == *'"errors"'* ]] ; then
# The API returned some other error.
echo "GitHub API hooks ERROR: $response"
exit 1
@@ -119,7 +119,7 @@ response=`curl -s -S -u "$user:$pass" -d "$post" $api/repos/pear/$package/hooks`
if [ $? -ne 0 ] ; then
echo "ERROR: curl had problem calling GitHub web hooks API."
exit 1
-elif [[ $response =~ .*"errors".* ]] ; then
+elif [[ $response == *'"errors"'* ]] ; then
# The API returned some other error.
echo "GitHub API hooks ERROR: $response"
exit 1

0 comments on commit 1b705d2

Please sign in to comment.