use official starlink install
This commit is contained in:
37
install.sh
37
install.sh
@@ -30,8 +30,6 @@ case "$DISTRO" in
|
|||||||
# EndeavourOS is Arch-based, use pacman
|
# EndeavourOS is Arch-based, use pacman
|
||||||
PACMAN_PACKAGES=(
|
PACMAN_PACKAGES=(
|
||||||
stow
|
stow
|
||||||
# prompt
|
|
||||||
starship
|
|
||||||
# sway ecosystem
|
# sway ecosystem
|
||||||
swayidle
|
swayidle
|
||||||
# bar & notifications
|
# bar & notifications
|
||||||
@@ -61,8 +59,6 @@ case "$DISTRO" in
|
|||||||
fedora)
|
fedora)
|
||||||
DNF_PACKAGES=(
|
DNF_PACKAGES=(
|
||||||
stow
|
stow
|
||||||
# prompt
|
|
||||||
starship
|
|
||||||
# sway ecosystem
|
# sway ecosystem
|
||||||
swayidle
|
swayidle
|
||||||
# bar & notifications
|
# bar & notifications
|
||||||
@@ -92,8 +88,6 @@ case "$DISTRO" in
|
|||||||
arch)
|
arch)
|
||||||
PACMAN_PACKAGES=(
|
PACMAN_PACKAGES=(
|
||||||
stow
|
stow
|
||||||
# prompt
|
|
||||||
starship
|
|
||||||
# sway ecosystem
|
# sway ecosystem
|
||||||
swayidle
|
swayidle
|
||||||
# bar & notifications
|
# bar & notifications
|
||||||
@@ -115,11 +109,11 @@ case "$DISTRO" in
|
|||||||
jq
|
jq
|
||||||
firefox
|
firefox
|
||||||
)
|
)
|
||||||
|
|
||||||
echo "Installing packages for Arch Linux..."
|
echo "Installing packages for Arch Linux..."
|
||||||
sudo pacman -S --noconfirm "${PACMAN_PACKAGES[@]}"
|
sudo pacman -S --noconfirm "${PACMAN_PACKAGES[@]}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "ERROR: Unsupported distribution: $DISTRO"
|
echo "ERROR: Unsupported distribution: $DISTRO"
|
||||||
echo "Supported distributions: fedora, arch, endeavouros"
|
echo "Supported distributions: fedora, arch, endeavouros"
|
||||||
@@ -128,13 +122,13 @@ case "$DISTRO" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Packages not in Fedora repos — install manually if missing
|
# Packages not in Fedora repos - install manually if missing
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
warn_missing() {
|
warn_missing() {
|
||||||
local cmd="$1" msg="$2"
|
local cmd="$1" msg="$2"
|
||||||
if ! command -v "$cmd" &>/dev/null; then
|
if ! command -v "$cmd" &>/dev/null; then
|
||||||
echo "WARNING: '$cmd' not found — $msg"
|
echo "WARNING: '$cmd' not found - $msg"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +136,19 @@ warn_missing autotiling "install via pip: pip install --user autotiling"
|
|||||||
warn_missing eww "install from https://github.com/elkowar/eww/releases"
|
warn_missing eww "install from https://github.com/elkowar/eww/releases"
|
||||||
warn_missing wezterm "install from https://wezfurlong.org/wezterm/install/linux.html"
|
warn_missing wezterm "install from https://wezfurlong.org/wezterm/install/linux.html"
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Starship
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if ! command -v starship &>/dev/null; then
|
||||||
|
echo ""
|
||||||
|
echo "Installing Starship..."
|
||||||
|
curl -sS https://starship.rs/install.sh | sh
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Starship already installed, skipping."
|
||||||
|
fi
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# NPM packages
|
# NPM packages
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -201,15 +208,15 @@ echo "Stowing dotfiles..."
|
|||||||
CONFLICTS=()
|
CONFLICTS=()
|
||||||
for PACKAGE in "$DOTFILES_DIR"/*/; do
|
for PACKAGE in "$DOTFILES_DIR"/*/; do
|
||||||
PACKAGE="$(basename "$PACKAGE")"
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
|
||||||
# Skip hidden directories and .git
|
# Skip hidden directories and .git
|
||||||
[[ "$PACKAGE" == .* ]] && continue
|
[[ "$PACKAGE" == .* ]] && continue
|
||||||
|
|
||||||
# Check if package has files that would conflict
|
# Check if package has files that would conflict
|
||||||
while IFS= read -r -d '' dotfile; do
|
while IFS= read -r -d '' dotfile; do
|
||||||
# Get the target path this would create
|
# Get the target path this would create
|
||||||
TARGET_PATH="${HOME}/${dotfile#$DOTFILES_DIR/$PACKAGE/}"
|
TARGET_PATH="${HOME}/${dotfile#$DOTFILES_DIR/$PACKAGE/}"
|
||||||
|
|
||||||
# If target exists and is NOT a symlink to the correct location, it's a conflict
|
# If target exists and is NOT a symlink to the correct location, it's a conflict
|
||||||
if [[ -e "$TARGET_PATH" ]] && [[ ! -L "$TARGET_PATH" ]]; then
|
if [[ -e "$TARGET_PATH" ]] && [[ ! -L "$TARGET_PATH" ]]; then
|
||||||
CONFLICTS+=("$PACKAGE (file: $TARGET_PATH)")
|
CONFLICTS+=("$PACKAGE (file: $TARGET_PATH)")
|
||||||
@@ -228,10 +235,10 @@ fi
|
|||||||
# Stow all packages
|
# Stow all packages
|
||||||
for PACKAGE in "$DOTFILES_DIR"/*/; do
|
for PACKAGE in "$DOTFILES_DIR"/*/; do
|
||||||
PACKAGE="$(basename "$PACKAGE")"
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
|
||||||
# Skip hidden directories
|
# Skip hidden directories
|
||||||
[[ "$PACKAGE" == .* ]] && continue
|
[[ "$PACKAGE" == .* ]] && continue
|
||||||
|
|
||||||
echo " $PACKAGE"
|
echo " $PACKAGE"
|
||||||
stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE"
|
stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user