-
Notifications
You must be signed in to change notification settings - Fork 0
/
cn-start.sh
36 lines (35 loc) · 1004 Bytes
/
cn-start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# 中国LGSM快捷安装脚本
# 作者:地皮-DefiedParty
# 作者主页:https://dpii.club
# 项目地址:https://dpii.club/lgsm-cn-yes
# gitee主页:https://gitee.com/DefiedParty/LinuxGSM
isnowdir="u"
if [ "$1" == "--isnowdir" ]
then
isnowdir="y"
fi
echo "LinuxGSM-China-YES 地皮-DefiedParty"
if [ "$isnowdir" == "u" ]
then
read -p "是否要在当前目录下初始化?如果当前目录下有其他文件可能引发未知问题!(y/n)" isnowdir
fi
if [ "$isnowdir" == "n" ]
then
git clone https://gitee.com/DefiedParty/LinuxGSM
chmod +x linuxgsm.sh
chmod -R 764 lgsm/functions
echo "初始化完成"
elif [ "$isnowdir" == "y" ]
then
git clone --no-checkout https://gitee.com/DefiedParty/LinuxGSM.git dltmp
mv dltmp/.git .
rm -rf dltmp
git reset --hard HEAD
chmod +x linuxgsm.sh
chmod -R 764 lgsm/functions
echo "初始化完成"
elif [ "$isnowdir" == "u" ]
then
echo "未选择是否在当前目录下初始化"
fi