Fedora Fix

This commit is contained in:
MangoPig
2026-05-31 20:48:18 +01:00
parent 5e7031d700
commit 1e2515a21a
6 changed files with 102 additions and 12 deletions

View File

@@ -33,7 +33,7 @@ PACKAGES=(
python bison mercurial
ripgrep fd bat fzf jq
btop httpie gnupg
zoxide stow
zoxide stow direnv
bind nmap socat tcpdump net-tools
strace gdb hexyl
ninja-build libcurl4-openssl-dev
@@ -134,6 +134,7 @@ fi
if is_fedora_family; then
FINAL_PACKAGES+=(ca-certificates pkgconf-pkg-config cmake)
FINAL_PACKAGES+=(R-core gcc-gfortran bzip2 bzip2-devel readline-devel sqlite sqlite-devel tk-devel libffi-devel xz xz-devel ncurses-devel zlib-devel findutils llvm)
fi
echo -e "${BLUE} LOG:${YELLOW} Installing: ${NC}${FINAL_PACKAGES[*]}"
@@ -159,8 +160,24 @@ cp -f "$REPO_ROOT/bin/"* "$HOME/.local/bin/"
chmod +x "$HOME/.local/bin/"*
if ! command -v rclone &> /dev/null; then
echo -e "${BLUE} LOG:${YELLOW} Installing Rclone (Latest)...${NC}"
curl https://rclone.org/install.sh | sudo bash
echo -e "${BLUE} LOG:${YELLOW} Installing Rclone CLI...${NC}"
case "$ARCH" in
x86_64)
RCLONE_ARCH="amd64"
;;
aarch64)
RCLONE_ARCH="arm64"
;;
esac
TEMP_DIR="$(mktemp -d)"
RCLONE_ZIP="$TEMP_DIR/rclone.zip"
curl -fLsS "https://downloads.rclone.org/rclone-current-linux-${RCLONE_ARCH}.zip" -o "$RCLONE_ZIP"
unzip -q "$RCLONE_ZIP" -d "$TEMP_DIR"
install -m 755 "$TEMP_DIR"/rclone-*-linux-"${RCLONE_ARCH}"/rclone "$HOME/.local/bin/rclone"
rm -rf "$TEMP_DIR"
fi
if ! command -v earthly &> /dev/null; then
@@ -236,8 +253,17 @@ rm -f "$HOME/.zshrc" "$HOME/.zsh_aliases"
touch "$HOME/.zsh_secrets"
# 7. Set Shell
if [ "$SHELL" != "$(which zsh)" ]; then
sudo chsh -s "$(which zsh)" $(whoami)
TARGET_SHELL="$(command -v zsh)"
CURRENT_LOGIN_SHELL="$(getent passwd "$(whoami)" | cut -d: -f7)"
if [ "$CURRENT_LOGIN_SHELL" != "$TARGET_SHELL" ]; then
if command -v chsh >/dev/null 2>&1; then
sudo chsh -s "$TARGET_SHELL" "$(whoami)"
elif command -v usermod >/dev/null 2>&1; then
sudo usermod -s "$TARGET_SHELL" "$(whoami)"
else
echo -e "${YELLOW} NOTE:${NC} Could not find chsh/usermod. Please change your login shell to $TARGET_SHELL manually."
fi
fi
echo -e "${GREEN} LOG: Base System Setup Complete.${NC}"