From 3d8939f229019f56fda835c2c1142e8fba27fc82 Mon Sep 17 00:00:00 2001 From: Leon <62660101+Oreomeow@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:43:21 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B1self-use?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/sh/Update.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Scripts/sh/Update.sh diff --git a/Scripts/sh/Update.sh b/Scripts/sh/Update.sh new file mode 100644 index 0000000..beda868 --- /dev/null +++ b/Scripts/sh/Update.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +dir_config=/ql/config +dir_scripts=/ql/scripts +dir_raw=/ql/raw +config_raw_path=$dir_raw/config.sh +config_config_path=$dir_config/config.sh +extra_raw_path=$dir_raw/extra.sh +extra_config_path=$dir_config/extra.sh +code_raw_path=$dir_raw/code.sh +code_config_path=$dir_config/code.sh +task_before_raw_path=$dir_raw/task_before.sh +task_before_config_path=$dir_config/task_before.sh +defaultNum=4 +repoNum=4 + + +curl -sL https://git.io/config.sh > $config_raw_path +mv -b $config_raw_path $dir_config + +curl -sL https://git.io/extra.sh > $extra_raw_path +mv -b $extra_raw_path $dir_config +sed -i "s/\$default4/\$default${defaultNum}/g" $extra_config_path + +curl -sL https://git.io/code.sh > $code_raw_path +mv -b $code_raw_path $dir_config +sed -i "s/\$repo4/\$repoNum${repoNum}/g" $code_config_path + +curl -sL https://git.io/task_before.sh > $task_before_raw_path +# mv -b $task_before_raw_path $dir_config \ No newline at end of file