From 4d527be52111772c86919b2aab16cdd140821dc2 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 16 Nov 2020 15:49:54 +0100 Subject: [PATCH] install.sh: Create all destination directories The explit list of destination directories to create is incomplete which becomes apperent, if installed into a empty directoy with DESTDIR=... Create any required directory implicitly. --- install.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 8632a44..35537c3 100755 --- a/install.sh +++ b/install.sh @@ -58,6 +58,8 @@ function install_if() shift 2 if need_update "$src" "$dst"; then + dir="$(dirname "$dst")" + test -d "$dir" || mkdir -p "$dir" "$@" "$src" "$dst" fi return 0 @@ -65,7 +67,6 @@ function install_if() function install_desktop_file() { - test -d ${desktopdir} || mkdir -p ${desktopdir} install_if "$1" "$2" $INSTALL_DATA update-desktop-database ${desktopdir} } @@ -94,13 +95,6 @@ function install_symlink() umask 022; -mkdir -p "$DESTDIR$usr_bindir" -mkdir -p "$DESTDIR$usr_sbindir" -mkdir -p "$DESTDIR$systemdunitdir" -mkdir -p "$DESTDIR$usrlocal_bindir" -mkdir -p "$DESTDIR$udev_rulesdir" -mkdir -p "$DESTDIR$udev_helperdir" - install_exec make-automaps/make-automaps "$DESTDIR$usr_sbindir/make-automaps" install_data misc_systemd_units/automount.service "$DESTDIR$systemdunitdir/automount.service" install_data misc_systemd_units/dhcrelay.service "$DESTDIR$systemdunitdir/dhcrelay.service"