~vbursian/research-assistant/intervers

« back to all changes in this revision

Viewing changes to scripts/clear

  • Committer: Viktor Bursian
  • Date: 2013-06-06 15:10:08 UTC
  • Revision ID: vbursian@gmail.com-20130606151008-6641eh62f0lgx8jt
Tags: version_0.3.0
versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash 
 
2
dirname=`dirname $0`
 
3
cd $dirname/..
 
4
echo "Cleaning "$PWD
 
5
 
 
6
if ( [ "$1" == "exe" ] ) || ( [ "$2" == "exe" ] ) || ( [ "$3" == "exe" ] ) ; then
 
7
  echo "removing executives"
 
8
  rm -f {bin,bin-debug}/{RA,rap,libRA,librap,install,test,tst}*
 
9
  [ -e bin ] && rmdir bin
 
10
  if [ -e bin ]; then
 
11
    echo  "!!!!!!!!!!!!!! Cannot delete bin: it is not empty"
 
12
    echo Press Enter...
 
13
    read
 
14
  fi 
 
15
  [ -e bin-debug ] && rmdir bin-debug
 
16
  if [ -e bin-debug ]; then
 
17
    echo  "!!!!!!!!!!!!!! Cannot delete bin-debug: it is not empty"
 
18
    echo Press Enter...
 
19
    read
 
20
  fi 
 
21
fi
 
22
 
 
23
if ( [ "$1" == "user" ] ) || ( [ "$2" == "user" ] ) || ( [ "$3" == "user" ] ) ; then
 
24
  echo "removing user settings"
 
25
  rm -f {./,*/,*/*/}*.pro.user
 
26
fi
 
27
 
 
28
if ( [ "$1" == "make" ] ) || ( [ "$2" == "make" ] ) || ( [ "$3" == "make" ] ) ; then
 
29
  echo "removing make files etc."
 
30
  rm -f {bin,bin-debug}/*.a
 
31
  rm -R -f build
 
32
  rm -f {./,*/,*/*/}{Makefile,Makefile.Debug,Makefile.Release,object_script.*}
 
33
fi
 
34
 
 
35
echo "removing garbage"
 
36
rm -f {./,*/,*/*/}{*~,*.bak}
 
37
 
 
38
echo "Done"
 
39
sleep 5
 
40
#echo "Press Enter..."
 
41
#read
 
42