mirror of
https://github.com/systemd/systemd.git
synced 2024-11-04 22:21:55 +03:00
3f491cccef
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.
29 lines
544 B
Bash
Executable File
29 lines
544 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
unitdir="$1"
|
|
target="$2"
|
|
unit="$3"
|
|
|
|
case "$target" in
|
|
*/?*) # 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 -vp -m 0755 "$dir"
|
|
;;
|
|
*)
|
|
mkdir -vp -m 0755 "$(dirname "$dir")"
|
|
;;
|
|
esac
|
|
|
|
ln -vfs --relative "$unitpath" "$dir"
|