
#!/bin/sh

export SHELLOPTS
set -o igncr


filename1="debug/analyze_"
filename2=`date "+%Y%m%d-%H%M%S"`
filename3=".txt"
filename=$filename1$filename2$filename3

cd $(dirname $0);pwd
cd ../

echo "Do you NOT include ALL header file?"
read -p "(Y/n) -> " all_header

# Read all files

echo "Your LOG FILE is "$filename
if test $all_header = "y" || test $all_header = "Y"; then
    python3 programs/analyze_programs/analyze.py -no_include y
    echo "--DEBUG END--"
elif test $all_header = "n" || test $all_header = "N"; then
    python3 programs/analyze_programs/analyze.py -no_include n > $filename
    echo "--DEBUG END--"
    
# Don't inputed both y or Y and n or N
else
    echo "Please input Y/n"
    echo "exit this script."
    exit -1
fi

