1
0
mirror of https://github.com/Klagarge/Cursor.git synced 2024-11-22 17:43:26 +00:00
Cursor/Scripts/cleanGenerated.bash
2021-11-24 10:50:51 +01:00

39 lines
1.4 KiB
Bash
Executable File

#!/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