meson: fix dirname/basename confusion in meson-and-wants.sh install helper (#10126)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Sep 2018 07:01:58 +0000 (09:01 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 Sep 2018 07:01:58 +0000 (16:01 +0900)
We would create a useless empty directory under build/.
It seems we were lucky and all symlinks were installed into directories
which were alredy created because we installed something into the same
location earlier.

While at it, also add '-v' to 'mkdir -p'. This will print the names of
directories as they are created (just once), making it easier to see all of
what the install script is doing.

units/meson-add-wants.sh

index 70f7172..e2b2603 100755 (executable)
@@ -18,10 +18,10 @@ unitpath="${DESTDIR:-}${unitdir}/${unit}"
 
 case "$target" in
         */)
-                mkdir -p -m 0755 "$dir"
+                mkdir -vp -m 0755 "$dir"
                 ;;
         *)
-                mkdir -p -m 0755 "$(basename "$dir")"
+                mkdir -vp -m 0755 "$(dirname "$dir")"
                 ;;
 esac