diff --git a/diy-mini.sh b/diy-mini.sh index 1ec8f5de1f..e1d6189783 100644 --- a/diy-mini.sh +++ b/diy-mini.sh @@ -6,7 +6,7 @@ # 更改默认 Shell 为 zsh # sed -i 's/\/bin\/ash/\/usr\/bin\/zsh/g' package/base-files/files/etc/passwd -# TTYD 自动登录 +# TTYD 免登录 # sed -i 's|/bin/login|/bin/login -f root|g' feeds/packages/utils/ttyd/files/ttyd.config # 移除要替换的包 @@ -20,7 +20,7 @@ rm -rf feeds/luci/applications/luci-app-netdata # Git稀疏克隆,只克隆指定目录到本地 function git_sparse_clone() { branch="$1" repourl="$2" && shift 2 - git clone --depth=1 -b $branch --single-branch --sparse $repourl + git clone --depth=1 -b $branch --single-branch --filter=blob:none --sparse $repourl repodir=$(echo $repourl | awk -F '/' '{print $(NF)}') cd $repodir && git sparse-checkout set $@ mv -f $@ ../package diff --git a/diy-script.sh b/diy-script.sh index 41f2ea74d1..ec5fe69c10 100644 --- a/diy-script.sh +++ b/diy-script.sh @@ -6,7 +6,7 @@ # 更改默认 Shell 为 zsh # sed -i 's/\/bin\/ash/\/usr\/bin\/zsh/g' package/base-files/files/etc/passwd -# TTYD 自动登录 +# TTYD 免登录 # sed -i 's|/bin/login|/bin/login -f root|g' feeds/packages/utils/ttyd/files/ttyd.config # 移除要替换的包 @@ -22,7 +22,7 @@ rm -rf feeds/luci/applications/luci-app-serverchan # Git稀疏克隆,只克隆指定目录到本地 function git_sparse_clone() { branch="$1" repourl="$2" && shift 2 - git clone --depth=1 -b $branch --single-branch --sparse $repourl + git clone --depth=1 -b $branch --single-branch --filter=blob:none --sparse $repourl repodir=$(echo $repourl | awk -F '/' '{print $(NF)}') cd $repodir && git sparse-checkout set $@ mv -f $@ ../package