35 lines
1004 B
Bash
Executable File
35 lines
1004 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "***** INSTALL SYMLINKS *****"
|
|
|
|
ROOTDIR=$(cd "$(dirname "$0")/.." && pwd)
|
|
|
|
# Create config directory if not present
|
|
mkdir -p "$HOME/.config"
|
|
|
|
install_symlink() {
|
|
local srcdir="$1"
|
|
local dstdir="$2"
|
|
|
|
# Backup configs that are not already symlinked
|
|
if [ -e "$dstdir" ] && [ ! -L "$dstdir" ]; then
|
|
mv -v "$dstdir" "$dstdir.backup"
|
|
fi
|
|
|
|
# Create symlinks, forcing updates
|
|
ln -fnsv "$srcdir" "$dstdir"
|
|
}
|
|
|
|
install_symlink "$ROOTDIR/atuin" "$HOME/.config/atuin"
|
|
install_symlink "$ROOTDIR/bat" "$HOME/.config/bat"
|
|
install_symlink "$ROOTDIR/fd" "$HOME/.config/fd"
|
|
install_symlink "$ROOTDIR/fish" "$HOME/.config/fish"
|
|
install_symlink "$ROOTDIR/ghostty" "$HOME/.config/ghostty"
|
|
install_symlink "$ROOTDIR/git" "$HOME/.config/git"
|
|
install_symlink "$ROOTDIR/helix" "$HOME/.config/helix"
|
|
install_symlink "$ROOTDIR/nix" "$HOME/.config/nix"
|
|
install_symlink "$ROOTDIR/ripgrep" "$HOME/.config/ripgrep"
|
|
install_symlink "$ROOTDIR/sbt" "$HOME/.config/sbt"
|
|
|
|
echo
|