X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4de0686f54039cd5211daebcf5a51ad475594170..df24434f71376caa4d973345694cb8aee30255bf:/Filter.sh diff --git a/Filter.sh b/Filter.sh index 00dc10c..bb76b0a 100755 --- a/Filter.sh +++ b/Filter.sh @@ -1,9 +1,16 @@ -#!/bin/bash +#!/usr/bin/env bash filters=("$@") while IFS= read -r line; do - if [[ ${line} = @begin* ]]; then + if [[ ${line} = @if* ]]; then + line=${line#@if } + for name in "${filters[@]}"; do + if [[ ${line} = ${name}' '* ]]; then + echo "${line#${name} }" + fi + done + elif [[ ${line} = @begin* ]]; then set ${line}; shift filter= for name in "${filters[@]}"; do