diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-12-05 01:47:09 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-12-05 01:47:09 +0100 |
commit | 73667159d9907cfd0695c3fdd7c0a2f31a6fee79 (patch) | |
tree | 3a2632add536c1a988bb3eb9cd8a8529cc49a399 | |
parent | e9f52f24c29f798d618c6e8e68ceabbd86bd0c6c (diff) | |
download | dotfiles-73667159d9907cfd0695c3fdd7c0a2f31a6fee79.tar.gz |
link: create folders, if they don't exist
-rw-r--r-- | lib/funcs.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/funcs.sh b/lib/funcs.sh index 0122c60..585c4aa 100644 --- a/lib/funcs.sh +++ b/lib/funcs.sh @@ -84,6 +84,11 @@ link() { fi fi + if [ ! -d "$(dirname $2)" ]; then + debug "$(dirname $2) does not exit. Creating it." + mkdir -p "$(dirname $2)" + fi + ln -s "$1" "$2" } |