OSDN Git Service

contrib-list: fix githubify function
authorscribu <mail@scribu.net>
Sun, 4 Aug 2013 23:59:46 +0000 (02:59 +0300)
committerscribu <mail@scribu.net>
Sun, 4 Aug 2013 23:59:46 +0000 (02:59 +0300)
utils/contrib-list

index 43d8f15..fbce281 100755 (executable)
@@ -9,14 +9,14 @@ prev_version=$1
 linked=$2
 
 githubify() {
-       local url="https://github.com/$name"
-       local response_code=$(curl -o /dev/null --silent --head --write-out '%{http_code}\n' $url)
+       while read name; do
+               local url="https://github.com/$name"
+               local response_code=$(curl -o /dev/null --silent --head --write-out '%{http_code}\n' $url)
 
-       if [ "200" != "$response_code" ]; then
-               echo "$response_code: $url" 1>&2;
-       fi
+               if [ "200" != "$response_code" ]; then
+                       echo "$response_code: $url" 1>&2;
+               fi
 
-       while read name; do
                echo " [$name]($url)"
        done
 }