#!/bin/sh
WORK_HOME=`pwd`
filesPath=$WORK_HOME"/files"
#判断files目录是否存在,如果不存在提示并退出程序
if [ ! -d "$filesPath" ]; then
echo "不存在目录:$filesPath";
exit 0;
else
echo "成功找到目录:$filesPath";
fi
#判断files目录是否为空
fileCount=`ls $filesPath | wc -l`
echo "files目录内文件数量:$fileCount"
if [ ! "$fileCount" -gt "0" ]; then
echo "files目录是空的,没有要更新的内容,退出"
exit 0;
fi
echo "==========================================="
jarlist=`find *.jar`
for jarName in $jarlist
do
echo "开始处理:" $jarName
cp $jarName files
cd files
jar uvf $jarName *
mv $jarName ../
cd $WORK_HOME
echo "==========================================="
done
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
呵呵哈哈哈还好还好哈哈哈哈