简单来说就是想通过命令行手动编译Java文件,但不想对每个目录都做。我试图编写这个脚本,但它似乎不起作用。
CUR=$PWD # save workspace directory to return
for line in `find -type d -name src` # find and loop through src paths
do
eval cd $line # go to src
eval javac *.java
eval jar *.class # I need to have a jar for my project
eval mv ../bin/
cd $CUR
done