💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
1、写一个超时任务 ``` #!/bin/bash set -x DIRECTORY_APP="/data/aici/ci-console/.jenkins/jobs/TEST_crm3_app_so/workspace/snack/gulp" DIRECTORY_ASSIST="/data/aici/ci-console/.jenkins/jobs/TEST_crm3_app_assist/workspace/snack/gulp" TIME_CONSUME=0 DIRECTORY_EXIST=0 if [ "$1" = "app" ]; then DIRECTORY=$DIRECTORY_APP elif [ "$1" = "assist" ]; then DIRECTORY=$DIRECTORY_ASSIST else echo "[ERROR]eg $0 app|assist" exit 1 fi echo $DIRECTORY while true do if [ -d $DIRECTORY ]; then DIRECTORY_EXIST=1 # DIRECTORY_EXIST is true break elif [ $TIME_CONSUME -eq 60 ]; then break else sleep 1 TIME_CONSUME=`expr $TIME_CONSUME + 1` fi done if [ $DIRECTORY_EXIST -eq 0 ]; then echo "$DIRECTORY does not exist!" exit 1 else cp /app/aici/node_modules.tar $DIRECTORY/ && tar -xvf $DIRECTORY/node_modules.tar -C $DIRECTORY/ fi ```