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