]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: $DESTDIR might be undefined
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Apr 2017 16:06:14 +0000 (12:06 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 24 Apr 2017 23:25:33 +0000 (19:25 -0400)
This causes an error with -u. Just add an empty fallback.

tools/meson-make-symlink.sh
units/meson-add-wants.sh

index 69eab9ba733542d7885592b4d8ca88a6822f4735..360ff92ebb223e83b9e4e12377f4b0516a68b8e7 100755 (executable)
@@ -3,9 +3,9 @@
 # this is needed mostly because $DESTDIR is provided as a variable,
 # and we need to create the target directory...
 
-mkdir -vp "$(dirname "${DESTDIR}$2")"
+mkdir -vp "$(dirname "${DESTDIR:-}$2")"
 if [ "$(dirname $1)" = . ]; then
-    ln -vfs -T "$1" "${DESTDIR}$2"
+    ln -vfs -T "$1" "${DESTDIR:-}$2"
 else
-    ln -vfs -T --relative "${DESTDIR}$1" "${DESTDIR}$2"
+    ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
 fi
index 7fbf5ed6fc9c62cf9311642bd86a51599ffd12f8..e2f5a355bc7da1ee90e681b42bc5cefbe6e5ce5d 100755 (executable)
@@ -6,14 +6,14 @@ unit="$3"
 
 case "$target" in
     */?*) # a path, but not just a slash at the end
-        dir="${DESTDIR}${target}"
+        dir="${DESTDIR:-}${target}"
         ;;
     *)
-        dir="${DESTDIR}${unitdir}/${target}"
+        dir="${DESTDIR:-}${unitdir}/${target}"
         ;;
 esac
 
-unitpath="${DESTDIR}${unitdir}/${unit}"
+unitpath="${DESTDIR:-}${unitdir}/${unit}"
 
 case "$target" in
     */)