]> git.saurik.com Git - cycript.git/blob - Filter.sh
Removed make.sh: why not?
[cycript.git] / Filter.sh
1 #!/usr/bin/env bash
2
3 filters=("$@")
4
5 while IFS= read -r line; do
6 if [[ ${line} = @begin* ]]; then
7 set ${line}; shift
8 filter=
9 for name in "${filters[@]}"; do
10 for side in "$@"; do
11 if [[ ${name} == ${side} ]]; then
12 unset filter
13 fi
14 done
15 done
16 elif [[ ${line} = @end ]]; then
17 unset filter
18 elif [[ -z ${filter+@} ]]; then
19 echo "${line}"
20 fi
21 done