diff --git a/.gitignore b/.gitignore index 44f94e7..0f195dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .DS_Store -"gbvenv" -"__pycache__" +gbvenv +__pycache__ diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc deleted file mode 100644 index 01a69c7..0000000 Binary files a/__pycache__/app.cpython-313.pyc and /dev/null differ diff --git a/__pycache__/grabber.cpython-313.pyc b/__pycache__/grabber.cpython-313.pyc deleted file mode 100644 index 875efdc..0000000 Binary files a/__pycache__/grabber.cpython-313.pyc and /dev/null differ diff --git a/grabber.sh b/grabber.sh index 876439f..8827bed 100755 --- a/grabber.sh +++ b/grabber.sh @@ -121,62 +121,6 @@ touch $SUM_FILE $SUCCESS_LOG $ERROR_LOG echo -e "Logs of $DATE :\n" > $SUCCESS_LOG echo -e "Logs of $DATE :\n" > $ERROR_LOG -#--------- Tables associates source file to a file inside grabber folder, we won't use it atm --------- - -#-------- ARRAYS ----------------------------- -## FILES arrays -#declare -A FILES - -#FILES=( -# ["sources_list.file"]="/etc/apt/sources.list*" -# ["passwd.file"]="/etc/passwd" -# ["group.file"]="/etc/group" -# ["etc-network-interfaces.file"]="/etc/network/interfaces" -# ["etc-resolv-conf.file"]="/etc/resolv.conf" -#) - -## CMD arrays -#declare -A CMD - -#CMD=( -# ["systemd-analyze.cmd"]="systemd-analyze" -# ["systemd-blame.cmd"]="systemd-analyze blame" -# ["lspci.cmd"]="lspci" -# ["lsmem.cmd"]="lsmem --output-all" -# ["lscpu.cmd"]="lscpu" -# ["lsusb.cmd"]="lsusb" -# ["apt-installed.cmd"]="apt list --installed" -#) -#---------------------------------------------- - -## Call arrays and store in files with same command name then write if success or not in proper log file -#treat_file() { -# cat $2 | grep -v '^#' | grep -v '^$' > $1 -# if [ $? -eq 0 ]; then -# echo "[OK]: Fichier $1 géneré" >> $SUCCESS_LOG -# else -# echo "[ECHEC]: Erreur a la génération de $1 => Code de sortie $?" >> $ERROR_LOG -# fi -#} - -#for file in "${!FILES[@]}"; do -# treat_file $file "${FILES[$file]}" -#done - -#treat_cmd() { -# eval "$2" > $DIR/$1 2> >(tee -a $ERROR_LOG) -# if [ $? -eq 0 ]; then -# echo "[OK]: Fichier $1 géneré avec la commande $2" >> $SUCCESS_LOG -# else -# echo "[ECHEC]: Erreur a la génération de $1 => Code de sortie $?" >> $ERROR_LOG -# fi -#} - -#for cmd in "${!CMD[@]}"; do -# treat_cmd "$cmd" "${CMD[$cmd]}" -#done -############################################### - ############ WRITING THE SUMMARY ################# # Starting text for summary hello () {