Skip to content

Commit

Permalink
install.sh: Create all destination directories
Browse files Browse the repository at this point in the history
The explit list of destination directories to create is incomplete which
becomes apperent, if installed into a empry directoy with DESTDIR=...

Create any parent directory if a target is installed.
  • Loading branch information
donald committed Nov 16, 2020
1 parent 58e6ae1 commit 58f03d0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ 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
}

function install_desktop_file()
{
test -d ${desktopdir} || mkdir -p ${desktopdir}
install_if "$1" "$2" $INSTALL_DATA
update-desktop-database ${desktopdir}
}
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 58f03d0

Please sign in to comment.