summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-07 18:03:33 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-07 18:03:33 +0200
commitda274ae592f21096ac424e7aabe698b04813da75 (patch)
treecf53b212ad522ab280928c48dd7d811b99edc3f5
parentaf742566f6b950a2d1e861d1ed0c659148cc5ce4 (diff)
downloaddots-da274ae592f21096ac424e7aabe698b04813da75.tar.gz
Add files to ln.sh
-rwxr-xr-xln.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/ln.sh b/ln.sh
index 1c27db1..55040c9 100755
--- a/ln.sh
+++ b/ln.sh
@@ -1,5 +1,20 @@
-#!/bin/bash
+#!/usr/bin/env bash
-for dir in bat fzf ripgrep fish nvim; do
- ln -s ~/dots/"$dir" ~/.config/
+SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
+pushd $SCRIPT_DIR
+
+mkdir -p ~/.config
+pushd ~/.config
+for dir in bat fish fzf kitty nvim ripgrep; do
+ ln -s "${SCRIPT_DIR}/${dir}" .
+done
+popd
+
+pushd ~
+for f in $(find $SCRIPT_DIR -type f -name 'dot.*'); do
+ file="$(basename $f)"
+ ln -s "${SCRIPT_DIR}/${file}" "${file/dot/}"
done
+popd
+
+popd