-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclean.sh
More file actions
executable file
·46 lines (38 loc) · 1.11 KB
/
clean.sh
File metadata and controls
executable file
·46 lines (38 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
VERBOSE=""
HELP="no"
#-------------------------------------------------------
# Part 1: Check for and handle command-line arguments
#-------------------------------------------------------
for ARGI; do
UNDEFINED_ARG=$ARGI
if [ "${ARGI}" = "--verbose" -o "${ARGI}" = "-v" ] ; then
VERBOSE="-v"
UNDEFINED_ARG=""
fi
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
HELP="yes"
UNDEFINED_ARG=""
fi
if [ "${UNDEFINED_ARG}" != "" ] ; then
BAD_ARGS=$UNDEFINED_ARG
fi
done
if [ "${BAD_ARGS}" != "" ] ; then
printf "Bad Argument: %s \n" $BAD_ARGS
exit 0
fi
if [ "${HELP}" = "yes" ]; then
printf "%s [SWITCHES] \n" $0
printf "Switches: \n"
printf " --verbose \n"
printf " --help, -h \n"
exit 0;
fi
#-------------------------------------------------------
# Part 2: Do the cleaning!
#-------------------------------------------------------
rm -rf $VERBOSE LOG_*
rm -f $VERBOSE *~
rm -f $VERBOSE targ_*
rm -f $VERBOSE .LastOpenedMOOSLogDirectory