Commit b13fe612 by Xumeiquer

Update index_gen.sh with small optimization

parent f7549240
...@@ -21,19 +21,13 @@ function gen_index { ...@@ -21,19 +21,13 @@ function gen_index {
AVOID="_?index.yara?|utils" AVOID="_?index.yara?|utils"
if [ x"$BASE" == x"." ]; then if [ x"$BASE" == x"." ]; then
if [ $INC_MOBILE == false ]; then if [ $INC_MOBILE == false ]; then
if [ $OS == "Darwin" ]; then AVOID="_?index.yara?|utils|Mobile"
find -E $BASE -regex ".*\.yara?" | grep -vE "$AVOID|Mobile" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME fi
else if [ $OS == "Darwin" ]; then
# Linux version and potentialy Cygwin find -E $BASE -regex ".*\.yara?" | grep -vE "$AVOID" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
find $BASE -regex ".*\.yara?" | grep -vE "$AVOID|Mobile" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
fi
else else
if [ $OS == "Darwin" ]; then # Linux version and potentialy Cygwin
find -E $BASE -regex ".*\.yara?" | grep -vE "$AVOID" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME find $BASE -regex ".*\.yara?" | grep -vE "$AVOID" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
else
# Linux version and potentialy Cygwin
find $BASE -regex ".*\.yara?" | grep -vE "$AVOID" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
fi
fi fi
else else
if [ $OS == "Darwin" ]; then if [ $OS == "Darwin" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment