Made xmlstarlet finding code hopefully more POSIX

http://mywiki.wooledge.org/BashFAQ/081
This commit is contained in:
Kai Hendry
2012-06-27 12:06:39 +02:00
parent bccb4abc99
commit f3bdc2aac0
3 changed files with 21 additions and 18 deletions

View File

@@ -6,6 +6,7 @@ Cache-Control: no-cache
Content-Type: text/html
END
badinput() {
echo "<h1>Bad input, parameter id $@</h1>"
exit
@@ -57,15 +58,14 @@ then
echo Attempting an update
else
if curl -sI http://api.twitter.com/1/users/lookup.xml?screen_name=${id} |
if curl -sI http://api.twitter.com/1/users/lookup.xml?screen_name=${id} |
grep -q "Status: 404 Not Found"
then
echo "$id does not exist on twitter.com :("
exit
fi
echo Need to create u/$id
mkdir u/$id
mkdir -p u/$id
fi