lin
2025-08-20 171e08343a9b6df6c31197f5b4800e8004800f5b
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
#!/bin/bash
 
# $1: a directory, support the absolute directory and the kernel relative directory
 
if [ $# != 1 ]; then
   echo You should input as follow:
   echo $0 [a code directory]
   exit 0
fi
 
ORI_DIR=$1
DST_DIR=$1
 
IS_ABSOLUTE_DIR=`echo $ORI_DIR | grep "^/" -c`
if [ $IS_ABSOLUTE_DIR != 1 ]; then
   DST_DIR="../../../linux-3.4/"$ORI_DIR
fi
 
if [ ! -d $DST_DIR ]; then
   echo Invalid directory: $DST_DIR
   exit 100
fi
 
echo Check the directory: $DST_DIR ...
echo
java -jar CloneAnalyzer.jar -m 30 -d $DST_DIR