添加SDK自动下载

This commit is contained in:
星冉
2023-10-22 22:15:09 +08:00
parent 0e8ef5a10f
commit fb727a4871
2 changed files with 2 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ if [[ -n "$1" ]]; then
"# 127.0.0.1 my.parallels.com"
)
if [[ "$1" == "add" ]]; then
if [[ "$(awk 'END {print}' "${file}")" != "" ]]; then
if [[ "$(sudo -S awk 'END {print}' "${file}")" != "" ]]; then
sudo -S tee -a "${file}" >/dev/null <<-EOF
EOF

View File

@@ -3,5 +3,6 @@ cd "${0%/*}" || exit 1
read -p "⚙️ 请输入密码(明文)然后回车: " -r passwd
printf "\r\033[1A%s" "" 1>&2
printf "\r\033[K%s" "" 1>&2
find . -name "*.*" 2>/dev/null | xargs otool -l 2>/dev/null | grep -E "(minos|sdk)" 2>/dev/null
echo "${passwd}" | sudo -S echo "⚙️ 当前是 $(sudo -S whoami) 用户"
sudo -S ruby main.rb