From c89d0c12377cd406a9b7465d7c087aeb9faefa51 Mon Sep 17 00:00:00 2001 From: LoGin Date: Tue, 21 Nov 2023 20:24:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbootstrap=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E7=B3=BB=E5=88=97=E8=84=9A=E6=9C=AC=E5=BF=98=E4=BA=86source?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=9A=84shell=20rc=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#453)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/bootstrap.sh | 6 ++++-- tools/build_gcc_toolchain.sh | 3 +++ tools/grub_auto_install.sh | 3 +++ tools/install_musl_gcc.sh | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/bootstrap.sh b/tools/bootstrap.sh index 76798ea8..0e9df232 100644 --- a/tools/bootstrap.sh +++ b/tools/bootstrap.sh @@ -1,3 +1,6 @@ +CURRENT_SHELL=$(basename $SHELL) +source "$HOME/.$CURRENT_SHELL"rc + emulator="qemu" defpackman="apt-get" dockerInstall="true" @@ -18,7 +21,7 @@ congratulations() echo "| |" echo "| 你成功安装了DragonOS所需的依赖项! |" echo "| |" - echo "| 请关闭当前终端, 并重新打开一个终端 |" + echo "| 请[关闭]当前终端, 并[重新打开]一个终端 |" echo "| 然后通过以下命令运行: |" echo "| |" echo "| make run |" @@ -26,7 +29,6 @@ congratulations() echo "|------------------------------------------|" } - #################################### # 当检测到ubuntu或Debian时,执行此函数 # # 参数:第一个参数为包管理器 # diff --git a/tools/build_gcc_toolchain.sh b/tools/build_gcc_toolchain.sh index 3674e164..efa24935 100644 --- a/tools/build_gcc_toolchain.sh +++ b/tools/build_gcc_toolchain.sh @@ -1,3 +1,6 @@ +CURRENT_SHELL=$(basename $SHELL) +source "$HOME/.$CURRENT_SHELL"rc + # init something here current_path=$PATH current_pwd=$PWD diff --git a/tools/grub_auto_install.sh b/tools/grub_auto_install.sh index a65ebfc6..e2bdba0e 100644 --- a/tools/grub_auto_install.sh +++ b/tools/grub_auto_install.sh @@ -1,4 +1,7 @@ #!/bin/bash +CURRENT_SHELL=$(basename $SHELL) +source "$HOME/.$CURRENT_SHELL"rc + ABS_PREFIX=/opt/dragonos-grub grub_dir_i386_efi=${ABS_PREFIX}/arch/i386/efi/grub grub_dir_i386_legacy=${ABS_PREFIX}/arch/i386/legacy/grub diff --git a/tools/install_musl_gcc.sh b/tools/install_musl_gcc.sh index 54b5621e..1148c064 100644 --- a/tools/install_musl_gcc.sh +++ b/tools/install_musl_gcc.sh @@ -35,6 +35,7 @@ trap trap_handler SIGINT SHELL_RC=$(get_shell_rc_file) +source $SHELL_RC # 下载musl交叉编译工具链