mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 20:36:31 +00:00
tools/bootstrap.sh: fix archlinux and zsh issue (#535)
1. archlinux上没有libssl-dev包,相对应的包名是openssl 2. zsh用户使用bootstrap.sh 会因为 source ~/.zshrc 导致bash执行很多zsh built-in 指令出现非常多错误 3. mkdir命令加-p选项避免对象目录存在时(反复执行脚本)报错 4. 修复简单错误(typo gcc 为 binutils) 5. 修复bootstrap.sh等脚本无法在非tools/目录执行的错误
This commit is contained in:
@ -1,5 +1,19 @@
|
||||
#!/bin/bash
|
||||
CURRENT_SHELL=$(basename $SHELL)
|
||||
|
||||
if test -n "$ZSH_VERSION"; then
|
||||
CURRENT_SHELL=zsh
|
||||
elif test -n "$BASH_VERSION"; then
|
||||
CURRENT_SHELL=bash
|
||||
elif test -n "$KSH_VERSION"; then
|
||||
CURRENT_SHELL=ksh
|
||||
elif test -n "$FCEDIT"; then
|
||||
CURRENT_SHELL=ksh
|
||||
elif test -n "$PS3"; then
|
||||
CURRENT_SHELL=unknown
|
||||
else
|
||||
CURRENT_SHELL=sh
|
||||
fi
|
||||
|
||||
source "$HOME/.$CURRENT_SHELL"rc
|
||||
|
||||
ABS_PREFIX=/opt/dragonos-grub
|
||||
|
Reference in New Issue
Block a user