mdserver-web/scripts/plugin_compress.sh

22 lines
573 B
Bash
Raw Permalink Normal View History

2019-02-25 05:07:31 -05:00
#!/bin/bash
###
### 插件压缩
###
2023-11-08 12:32:59 -05:00
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
2019-02-25 05:07:31 -05:00
export PATH
LANG=en_US.UTF-8
is64bit=`getconf LONG_BIT`
curPath=`pwd`
rootPath=$(dirname "$curPath")
startTime=`date +%s`
2019-02-28 00:15:16 -05:00
PLUGIN_NAME='abkill'
2019-02-25 05:07:31 -05:00
#echo $rootPath/plugins/$PLUGIN_NAME
2019-02-28 00:15:16 -05:00
mkdir -p $rootPath/scripts/tmp
cd $rootPath/plugins/$PLUGIN_NAME && zip $rootPath/scripts/tmp/${PLUGIN_NAME}_${startTime}.zip -r ./* > /tmp/t.log + 2>&1
2019-02-25 05:07:31 -05:00
endTime=`date +%s`
2019-02-28 00:15:16 -05:00
((outTime=($endTime-$startTime)))
echo -e "Time consumed:\033[32m $outTime \033[0msecs.!"