mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-21 12:41:04 -05:00
find xmlstarlet even if it is called xml
which is the case with at least the Homebrew (OS X) and pkgsrc (many) package managers. FIXME: doesn't check if 'xml' is xmlstarlet TODO: fail explicitly if no
This commit is contained in:
@@ -10,6 +10,11 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# xmlstarlet is often just xml
|
||||
if ! which xmlstarlet >> /dev/null && which xml >> /dev/null; then
|
||||
alias xmlstarlet=xml
|
||||
fi
|
||||
|
||||
twitter_total=$(curl -s "http://api.twitter.com/1/users/lookup.xml?screen_name=$1" |
|
||||
xmlstarlet sel -t -m "//users/user/statuses_count" -v .)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user