1
0
SEm-Labos/06-07-08-09-SystemOnChip/Scripts/cleanGenerated.bash

39 lines
1.4 KiB
Bash
Raw Normal View History

2024-02-23 13:01:05 +00:00
#!/bin/bash
#================================================================================
# cleanGenerated.bash - Clean intermediate files form folder
#
base_directory="$(dirname "$(readlink -f "$0")")"
pushd $base_directory
base_directory="$base_directory/.."
SEPARATOR='--------------------------------------------------------------------------------'
INDENT=' '
echo "$SEPARATOR"
echo "-- ${0##*/} Started!"
echo ""
#-------------------------------------------------------------------------------
# Remove generated and cache files
#
find $base_directory -type f -name '.cache.dat' | xargs -r rm -v
find $base_directory -type f -name '*.bak' | xargs -r rm -v
find $base_directory -type f -name '*.lck' | xargs -r rm -v
find $base_directory -type f -name '*.vhd.info' | xargs -r rm -v
find $base_directory -type f -name 'default_view' | xargs -r rm -v
find $base_directory -type f -name '*_entity.vhd' | xargs -r rm -v
find $base_directory -type f -name '*_struct.vhd' | xargs -r rm -v
find $base_directory -type f -name '*_fsm.vhd' | xargs -r rm -v
find $base_directory -type f -name '*.vhg' | xargs -r rm -v
find $base_directory -type f -name '*.DS_Store' | xargs -r rm -v
find $base_directory -type d -name '.xrf' | xargs -r rm -Rv
#-------------------------------------------------------------------------------
# Exit
#
echo ""
echo "-- ${0##*/} Finished!"
echo "$SEPARATOR"
popd