#!/bin/bash
|
#!/bin/bash
|
|
|
# This script cleans the environment in order to save disk space,
|
# This script cleans the environment in order to save disk space,
|
# so that all the remaining stuff can be easily added to a tarfile.
|
# so that all the remaining stuff can be easily added to a tarfile.
|
# Be careful! It also deletes all the results of simulations and
|
# Be careful! It also deletes all the results of simulations and
|
# synthesis, so at the end you will have to recompile everything
|
# synthesis, so at the end you will have to recompile everything
|
# (it acts like a "make clean").
|
# (it acts like a "make clean").
|
|
|
if [ -z "$S1_ROOT" ]; then echo "***ERROR***: S1_ROOT variable is undefined, please set it and run 'source sourceme'."; exit 1; fi
|
test_var S1_ROOT
|
if ! [ -d "$S1_ROOT" ]; then echo "***ERROR***: directory '$S1_ROOT' does not exist, please check it and run 'source sourceme' again."; exit 1; fi
|
find $S1_ROOT -name ".svn" -exec rm -rf {} \;
|
|
|
find $S1_ROOT -name CVS -exec rm -rf {} \;
|
|
find $S1_ROOT -name "*~" -exec rm -rf {} \;
|
find $S1_ROOT -name "*~" -exec rm -rf {} \;
|
find $S1_ROOT -name "#*#" -exec rm -rf {} \;
|
find $S1_ROOT -name "#*#" -exec rm -rf {} \;
|
find $S1_ROOT -name "*.bin" -exec rm -rf {} \;
|
find $S1_ROOT -name "*.bin" -exec rm -rf {} \;
|
|
|
rm -rf $S1_ROOT/run/sim/icarus/*
|
rm -rf $S1_ROOT/run/sim/icarus/*
|
rm -rf $S1_ROOT/run/sim/vcs/*
|
rm -rf $S1_ROOT/run/sim/vcs/*
|
rm -rf $S1_ROOT/run/synth/fpga/*
|
rm -rf $S1_ROOT/run/synth/fpga/*
|
rm -rf $S1_ROOT/run/synth/dc/*
|
rm -rf $S1_ROOT/run/synth/dc/*
|
rm -rf $S1_ROOT/run/synth/dc/.s*
|
rm -rf $S1_ROOT/run/synth/dc/.s*
|
|
|
rm -f $S1_ROOT/*s1*tar.gz
|
rm -f $S1_ROOT/*s1*tar.gz
|
|
|
|
|