From 73667159d9907cfd0695c3fdd7c0a2f31a6fee79 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 5 Dec 2022 01:47:09 +0100 Subject: link: create folders, if they don't exist --- lib/funcs.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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" } -- cgit v1.2.3