Linux发行版通用安装脚本: make 和 gcc
#!/bin/bash
检查Linux发行版
if command -v yum >/dev/null 2>&1; then # CentOS/RHEL sudo yum install -y make gcc elif command -v apt-get >/dev/null 2>&1; then # Debian/Ubuntu sudo apt-get update sudo apt-get install -y make gcc elif command -v zypper >/dev/null 2>&1; then # openSUSE sudo zypper install -y make gcc else echo 'Unsupported Linux distribution' exit 1 fi
echo 'make and gcc are installed successfully'
原文地址: https://www.cveoy.top/t/topic/ofDj 著作权归作者所有。请勿转载和采集!