1 Star 0 Fork 1

cfy/jd-base

forked from Ragus/jd-base 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
jd.sh.sample 974 Bytes
一键复制 编辑 原始数据 按行查看 历史
evine 提交于 2020-11-23 15:05 +08:00 . Add 3 enviroment
#!/bin/bash
## Author: Evine Deng
## Source: https://github.com/EvineDeng/jd-base
## Modified: 2020-11-23
## Version: v2.3.0
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/data/data/com.termux/files/usr/bin"
export LC_ALL=C
# export JD_BEAN_SIGN_STOP_NOTIFY=
# export JD_BEAN_SIGN_NOTIFY_SIMPLE=
# export JD_USER_AGENT=
ShellDir=$(cd $(dirname $0); pwd)
RootDir=$(cd $(dirname $0); cd ..; pwd)
ScriptsDir=${RootDir}/scripts
LogDir=${RootDir}/log
FileCurrentBashName=$(basename $0)
FileRun=$(echo $FileCurrentBashName | perl -pe "s|\..*sh||")
## 无论是UTC时间还是北京时间,日志文件名均记录为北京时间
if [ "$TZ" = "UTC" ]
then
LogTime=$(date -d "8 hour" "+%Y-%m-%d-%H-%M-%S")
else
LogTime=$(date "+%Y-%m-%d-%H-%M-%S")
fi
LogFile="${LogDir}/${FileRun}/${LogTime}.log"
if [ ! -d ${LogDir}/${FileRun} ]; then
mkdir -p ${LogDir}/${FileRun}
fi
touch ${LogFile}
cd ${ScriptsDir}
node ${FileRun}.js > ${LogFile}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cfy123/jd-base.git
git@gitee.com:cfy123/jd-base.git
cfy123
jd-base
jd-base
main

搜索帮助