Commit b13fe612 by Xumeiquer

Update index_gen.sh with small optimization

parent f7549240
......@@ -21,20 +21,14 @@ function gen_index {
AVOID="_?index.yara?|utils"
if [ x"$BASE" == x"." ]; then
if [ $INC_MOBILE == false ]; then
if [ $OS == "Darwin" ]; then
find -E $BASE -regex ".*\.yara?" | grep -vE "$AVOID|Mobile" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
else
# Linux version and potentialy Cygwin
find $BASE -regex ".*\.yara?" | grep -vE "$AVOID|Mobile" | awk '{print "include \"" $0 "\""}' >> $IDX_NAME
AVOID="_?index.yara?|utils|Mobile"
fi
else
if [ $OS == "Darwin" ]; then
find -E $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
else
if [ $OS == "Darwin" ]; then
find -E $BASE -regex ".*\.yara?" | grep -vE "$AVOID" | awk '{print "include \"./" $0 "\""}' >> $IDX_NAME
......
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