Add mas CLI tool and Mac App Store apps section with Ivory
This commit is contained in:
parent
12b1fb3ff6
commit
1527a52800
50
install.sh
50
install.sh
|
@ -194,7 +194,6 @@ install_apps() {
|
|||
"crossover" # CrossOver - Windows 应用兼容层
|
||||
"zoom" # Zoom Workplace - 视频会议软件
|
||||
"tencent-meeting" # 腾讯会议 - 视频会议软件
|
||||
"topnotch" # Menu bar management tool
|
||||
)
|
||||
|
||||
total=${#apps[@]}
|
||||
|
@ -239,6 +238,52 @@ install_cli_tools() {
|
|||
brew install prettyping
|
||||
print_message "✅ prettyping 安装成功!" "$GREEN"
|
||||
fi
|
||||
|
||||
# mas - Mac App Store 命令行工具
|
||||
if command -v mas &> /dev/null; then
|
||||
print_message "✅ mas 已安装" "$GREEN"
|
||||
else
|
||||
brew install mas
|
||||
print_message "✅ mas 安装成功!" "$GREEN"
|
||||
fi
|
||||
}
|
||||
|
||||
# 安装 Mac App Store 应用
|
||||
install_mas_apps() {
|
||||
print_message "🛍️ 安装 Mac App Store 应用..." "$BLUE"
|
||||
|
||||
# 检查 mas 是否已安装
|
||||
if ! command -v mas &> /dev/null; then
|
||||
print_message "⚠️ mas 工具未安装,跳过 App Store 应用安装" "$YELLOW"
|
||||
return
|
||||
fi
|
||||
|
||||
# Mac App Store 应用列表
|
||||
mas_apps=(
|
||||
"6444602274" # Ivory - Mastodon 客户端
|
||||
)
|
||||
|
||||
total=${#mas_apps[@]}
|
||||
installed=0
|
||||
failed=0
|
||||
|
||||
for app_id in "${mas_apps[@]}"; do
|
||||
print_message "📦 正在安装 App Store 应用 ID: $app_id" "$YELLOW"
|
||||
if mas install "$app_id" 2>/dev/null; then
|
||||
print_message "✅ App Store 应用 $app_id 安装成功!" "$GREEN"
|
||||
((installed++))
|
||||
else
|
||||
print_message "❌ App Store 应用 $app_id 安装失败或已存在" "$RED"
|
||||
((failed++))
|
||||
fi
|
||||
done
|
||||
|
||||
print_message "========================================" "$CYAN"
|
||||
print_message "📊 Mac App Store 应用安装完成!" "$CYAN"
|
||||
print_message " 总计: $total 个应用" "$CYAN"
|
||||
print_message " 成功: $installed 个" "$GREEN"
|
||||
print_message " 失败/已存在: $failed 个" "$RED"
|
||||
print_message "========================================" "$CYAN"
|
||||
}
|
||||
|
||||
# 配置 SSH
|
||||
|
@ -433,6 +478,7 @@ full_install() {
|
|||
install_xcodes
|
||||
install_apps
|
||||
install_cli_tools
|
||||
install_mas_apps
|
||||
setup_ssh
|
||||
install_oh_my_zsh
|
||||
install_node
|
||||
|
@ -535,4 +581,4 @@ main() {
|
|||
# 只有在脚本被直接执行时才运行主函数
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]] || [[ -z "${BASH_SOURCE[0]}" ]]; then
|
||||
main "$@"
|
||||
fibrew install --cask bcut
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user