]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - units/meson-add-wants.sh
test-network: replace check_link_exists() with wait_online()
[thirdparty/systemd.git] / units / meson-add-wants.sh
index 70f7172ae906019e1863bd4698e950fa55d78861..a483d75b86f36d0b81223cae62fa12043c64d015 100755 (executable)
@@ -6,23 +6,23 @@ target="$2"
 unit="$3"
 
 case "$target" in
-        */?*) # a path, but not just a slash at the end
-                dir="${DESTDIR:-}${target}"
-                ;;
-        *)
-                dir="${DESTDIR:-}${unitdir}/${target}"
-                ;;
+    */?*) # a path, but not just a slash at the end
+        dir="${DESTDIR:-}${target}"
+        ;;
+    *)
+        dir="${DESTDIR:-}${unitdir}/${target}"
+        ;;
 esac
 
 unitpath="${DESTDIR:-}${unitdir}/${unit}"
 
 case "$target" in
-        */)
-                mkdir -p -m 0755 "$dir"
-                ;;
-        *)
-                mkdir -p -m 0755 "$(basename "$dir")"
-                ;;
+    */)
+        mkdir -vp -m 0755 "$dir"
+        ;;
+    *)
+        mkdir -vp -m 0755 "$(dirname "$dir")"
+        ;;
 esac
 
 ln -vfs --relative "$unitpath" "$dir"