From a1f9a7c82db8086fa6264bffa79aede75c2b8a39 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 18 Feb 2024 20:32:00 +0100 Subject: [PATCH] Fix dot-put script --- home/.local/bin/scripts/cli/dot-put | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home/.local/bin/scripts/cli/dot-put b/home/.local/bin/scripts/cli/dot-put index b5b35ad..971b83a 100755 --- a/home/.local/bin/scripts/cli/dot-put +++ b/home/.local/bin/scripts/cli/dot-put @@ -2,8 +2,9 @@ set -euo pipefail dotdir="$HOME/dots" -dothome="$dotdir/home" -dotroot="$dotdir/root" +# the trailing slashes are important here! +dothome="$dotdir/home/" +dotroot="$dotdir/root/" usage() { echo "$0" @@ -21,7 +22,7 @@ Details: } dotcopy() { - syspath="$1" + syspath="$(realpath "$1")" if [[ "$syspath" == "$HOME"* ]]; then dotpath="${syspath/#$HOME/$dothome}"