#!/bin/bash
#filename:getar
#desp:get a tar file from a dir!
out=`pwd`/admin_output
pike=/usr/bin/pike
if [ -n "$1" -a "$1" != "${1//[^0-9]/}” ];then
echo “The first parameter is not a number!”
exit
elif [[ $1 == "" ]];then
echo “The first parameter is null!”
exit
fiif [ -n "$2" -a "$2" != "${2//[^0-9]/}” ];then
echo “The second parameter is not a number!”
exit
elif [[ $2 == "" ]];then
echo “The second parameter is null!”
exit
else
touch /tmp/pike.tmp
sleep 10
$pike process_kaiqi_cid.pike $1 $2
while true;do
if [[ -e output/cid$2/standard/operamini-hifi_kaiqi-zh.jad && -e output/cid$2/standard/operamini-hifi_kaiqi-zh.jar ]];then
find `pwd`/output -type f -newer /tmp/pike.tmp | xargs tar czf $out/$1-$2.tgz >/dev/null 2>&1
rm -rf /tmp/pike.tmp
echo -e “\033[0;32;1mit’s ok\033[0m”
break
fi
done
fi
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/2695/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表