2
0

alfred-json 286 B

12345678910111213141516
  1. #!/bin/sh
  2. # only operate as "alfred-json -z -r NUM"
  3. [ "$1" != "-z" ] && exit 2
  4. [ "$2" != "-r" ] && exit 2
  5. num=$3
  6. if [ -z "$num" ]; then
  7. echo "Mimimi"
  8. exit 1
  9. fi
  10. # output requested alfred-NUM.json in script's dir
  11. fn=`dirname $0`
  12. fn=`readlink -f "$fn"`
  13. cat "${fn}/alfred-${num}.json"