Update st-free/a.sh
Browse files- st-free/a.sh +17 -4
st-free/a.sh
CHANGED
|
@@ -4,8 +4,8 @@ git clone https://github.com/SillyTavern/SillyTavern -b release
|
|
| 4 |
echo '拉取 SillyTavern 仓库 完毕'
|
| 5 |
cd SillyTavern
|
| 6 |
ls
|
| 7 |
-
echo '删除文件 data config.yaml
|
| 8 |
-
rm -r data config.yaml public/
|
| 9 |
|
| 10 |
# 提示用户输入源路径
|
| 11 |
read -p "请输入旧酒馆的路径(结尾带/): " source_path
|
|
@@ -37,6 +37,14 @@ else
|
|
| 37 |
echo "警告:未找到 config.yaml"
|
| 38 |
fi
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
# 移动 index.html
|
| 41 |
echo "$source_path/public/index.html"
|
| 42 |
if [ -f "$source_path/public/index.html" ]; then
|
|
@@ -45,11 +53,16 @@ if [ -f "$source_path/public/index.html" ]; then
|
|
| 45 |
else
|
| 46 |
echo "警告:未找到 index.html"
|
| 47 |
fi
|
| 48 |
-
|
| 49 |
# 执行 wget 下载
|
| 50 |
echo '开始下载额外文件'
|
| 51 |
wget -O src/server-main.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/server-main.js'
|
| 52 |
wget -O src/config.default.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/config.default.js'
|
| 53 |
wget -O src/endpoints/users-internal.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/users-internal.js'
|
| 54 |
wget -O src/middleware/ip-whitelist.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/ip-whitelist.js'
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
echo '拉取 SillyTavern 仓库 完毕'
|
| 5 |
cd SillyTavern
|
| 6 |
ls
|
| 7 |
+
echo '删除文件 data config.yaml login.html server-main.js 完毕'
|
| 8 |
+
rm -r data config.yaml public/login.html src/server-main.js public/favicon.ico public/st-launcher.ico public/st.ico /public/img
|
| 9 |
|
| 10 |
# 提示用户输入源路径
|
| 11 |
read -p "请输入旧酒馆的路径(结尾带/): " source_path
|
|
|
|
| 37 |
echo "警告:未找到 config.yaml"
|
| 38 |
fi
|
| 39 |
|
| 40 |
+
# 移动 img
|
| 41 |
+
echo "$source_path/public/img"
|
| 42 |
+
if [ -f "$source_path/public/img" ]; then
|
| 43 |
+
mv "$source_path/public/img" public/img/
|
| 44 |
+
echo "成功移动 /public/img"
|
| 45 |
+
else
|
| 46 |
+
echo "警告:未找到 /public/img"
|
| 47 |
+
fi
|
| 48 |
# 移动 index.html
|
| 49 |
echo "$source_path/public/index.html"
|
| 50 |
if [ -f "$source_path/public/index.html" ]; then
|
|
|
|
| 53 |
else
|
| 54 |
echo "警告:未找到 index.html"
|
| 55 |
fi
|
|
|
|
| 56 |
# 执行 wget 下载
|
| 57 |
echo '开始下载额外文件'
|
| 58 |
wget -O src/server-main.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/server-main.js'
|
| 59 |
wget -O src/config.default.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/config.default.js'
|
| 60 |
wget -O src/endpoints/users-internal.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/users-internal.js'
|
| 61 |
wget -O src/middleware/ip-whitelist.js 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/ip-whitelist.js'
|
| 62 |
+
wget -O public/login.html 'https://huggingface.co/datasets/Qilan2/st-server/raw/main/st-free/login.html'
|
| 63 |
+
|
| 64 |
+
wget -O public/favicon.ico 'https://huggingface.co/datasets/Qilan2/st-server/resolve/main/st-free/favicon.ico?download=true'
|
| 65 |
+
wget -O public/st-launcher.ico 'https://huggingface.co/datasets/Qilan2/st-server/resolve/main/st-free/st-launcher.ico?download=true'
|
| 66 |
+
wget -O public/st.ico 'https://huggingface.co/datasets/Qilan2/st-server/resolve/main/st-free/st.ico?download=true'
|
| 67 |
+
echo '下载完成'
|
| 68 |
+
|