refactor: 脚本及配置文件命名统一用 _ 分隔
将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名 改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为 nuance,并同步更新脚本内部引用与 README 路径。 Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
This commit is contained in:
46
debian_ddinstall_debi.sh
Executable file
46
debian_ddinstall_debi.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Thanks https://github.com/bohanyang/debi"
|
||||
echo
|
||||
|
||||
echo "::*** Enter debian version [8,9,10,11] or [leave blank] for 11"
|
||||
read -p "***:: " DEBIAN_VERSION
|
||||
if [ -z "${DEBIAN_VERSION}" ]
|
||||
then
|
||||
DEBIAN_VERSION=11
|
||||
fi
|
||||
|
||||
# 用 dpkg --print-architecture 更直接
|
||||
ARCH=`dpkg --print-architecture`
|
||||
# if [[ "$(uname -m)" = "aarch64" ]];
|
||||
# then
|
||||
# ARCH=arm64
|
||||
# elif [[ "$(uname -m)" = "armv7l" ]];
|
||||
# then
|
||||
# ARCH=arm
|
||||
# elif [[ "$(uname -m)" = "x86_64" ]];
|
||||
# then
|
||||
# ARCH=amd64
|
||||
# fi
|
||||
|
||||
echo "::*** Enter presets to download from [cdn, aws, china] or [leave blank] for cdn"
|
||||
read -p "***:: " PRESET
|
||||
if [ -z "${PRESET}" ]
|
||||
then
|
||||
PRESET=cdn
|
||||
fi
|
||||
|
||||
sudo curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh
|
||||
sudo chmod a+rx debi.sh
|
||||
sudo ./debi.sh --version $DEBIAN_VERSION --architecture `dpkg --print-architecture` --user root --$PRESET # --architecture 可参略或者[amd64(默认), i386, arm64, armhf];--password 可省略,则脚本启动后会问你要密码
|
||||
|
||||
echo
|
||||
echo "::*** Last chance!!! Enter [r] to reboot to new system, or [anything else] to cancel all changes"
|
||||
read -p "***:: " LAST
|
||||
if [ 'r' = "$LAST" ]
|
||||
then
|
||||
echo "::*** Shutdown now, wait for about 30 minutes (the project's github says 30 seconds), then try to ssh"
|
||||
sudo shutdown -r now
|
||||
else
|
||||
sudo rm -rf debi.sh /etc/default/grub.d/zz-debi.cfg /boot/debian-* && { sudo update-grub || sudo grub2-mkconfig -o /boot/grub2/grub.cfg; }
|
||||
fi
|
||||
Reference in New Issue
Block a user