Fedora Setup

This commit is contained in:
MangoPig
2026-05-29 15:57:17 +01:00
parent d5bcda270d
commit 3f753d0dd0
8 changed files with 338 additions and 98 deletions

View File

@@ -13,6 +13,21 @@ NC='\033[0m'
export GVM_ROOT="$HOME/.programming/go"
BOOTSTRAP_GO="$GVM_ROOT/bootstrap"
ARCH="$(uname -m)"
case "$ARCH" in
x86_64)
GO_BOOTSTRAP_ARCH="amd64"
;;
aarch64)
GO_BOOTSTRAP_ARCH="arm64"
;;
*)
echo -e "${RED} ERROR:${NC} Unsupported architecture for Go bootstrap: $ARCH"
exit 1
;;
esac
echo -e "${BLUE} LOG:${YELLOW} Setting up Go and GVM in ${GVM_ROOT}...${NC}"
if [ ! -d "$GVM_ROOT/scripts" ]; then
@@ -32,7 +47,7 @@ if [ ! -d "$BOOTSTRAP_GO" ]; then
echo -e "${BLUE} LOG:${YELLOW} Downloading Bootstrap Go...${NC}"
mkdir -p "$BOOTSTRAP_GO"
wget -q https://go.dev/dl/go1.20.5.linux-amd64.tar.gz -O /tmp/go-bootstrap.tar.gz
wget -q "https://go.dev/dl/go1.20.5.linux-${GO_BOOTSTRAP_ARCH}.tar.gz" -O /tmp/go-bootstrap.tar.gz
tar -C "$BOOTSTRAP_GO" -xzf /tmp/go-bootstrap.tar.gz --strip-components=1
rm /tmp/go-bootstrap.tar.gz
@@ -63,4 +78,3 @@ fi
gvm use "$TARGET_VER" --default
echo -e "${GREEN} SUCCESS:${NC} Go setup completed."