down2.sh 421 B

12345678910111213141516
  1. #!/bin/bash -e
  2. # File: down2.sh
  3. # Date: Wed Dec 24 22:31:37 2014 +0800
  4. # Author: Yuxin Wu
  5. # This script is used to download unicode emoji
  6. emojis=$(cat ../unicode-smiley.json | grep -o '\\ue[^"]*' | cut -c 3-)
  7. for i in $emojis; do
  8. size=$(wc -c "$i.png" 2>/dev/null | cut -f 1 -d ' ')
  9. if [[ -n "$size" && $size -ge 0 ]]; then
  10. echo "File $i Already There!"
  11. else
  12. wget http://www.easyapns.com/emoji/$i.png &
  13. fi
  14. done