-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetjars.sh
executable file
·47 lines (38 loc) · 964 Bytes
/
setjars.sh
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
46
47
#!/bin/bash
#===============================================================================
#
# FILE: setjars.sh
#
# USAGE: ./setjars.sh .
#
# DESCRIPTION: dynamically set the classpath of jars in current folder and
# ./lib folder and ./classes#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Dexter H. Hu (), [email protected]
# COMPANY: HKU CS
# VERSION: 1.0
# CREATED: 03/11/2011 07:58:15 PM HKT
# REVISION: ---
#===============================================================================
EXPECTED_ARGS=1
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: setjars.sh fullpath (otherwise please use . )"
exit 1
fi
cd $1
THE_CLASSPATH=.
for i in `ls ./lib/*.jar`
do
THE_CLASSPATH=${THE_CLASSPATH}:${i}
done
for i in `ls ./*.jar`
do
THE_CLASSPATH=${THE_CLASSPATH}:${i}
done
echo "classpath is:"
echo $THE_CLASSPATH
exit 0