diff --git a/install.sh b/install.sh index 8632a44..ab86fdb 100755 --- a/install.sh +++ b/install.sh @@ -58,18 +58,13 @@ 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} -} - function install_exec() { install_if "$1" "$2" $INSTALL_PROGRAM @@ -94,13 +89,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" @@ -184,12 +172,13 @@ mkdir -p "$DESTDIR$sysconfdir/issue.d/" install_symlink /node/issue.d/notrust.issue "$DESTDIR$sysconfdir/issue.d/notrust.issue" install_data checktrust/getty-checktrust.service "$DESTDIR$systemdunitdir/getty-checktrust.service" install_exec checktrust/getty-checktrust "$DESTDIR$usr_exec_prefix/libexec/getty-checktrust" -install_desktop_file desktop-files/org.inkscape.Inkscape.desktop \ - "$DESTDIR$desktopdir/org.inkscape.Inkscape.desktop" -install_desktop_file desktop-files/rstudio.desktop "$DESTDIR$desktopdir/rstudio.desktop" -install_desktop_file desktop-files/meld3.desktop "$DESTDIR$desktopdir/meld3.desktop" -install_desktop_file desktop-files/ugene.desktop "$DESTDIR$desktopdir/ugene.desktop" -install_desktop_file desktop-files/org.octave.Octave.desktop \ - "$DESTDIR$desktopdir/org.octave.Octave.desktop" -install_desktop_file desktop-files/igv.desktop "$DESTDIR$desktopdir/igv.desktop" +install_data desktop-files/org.inkscape.Inkscape.desktop "$DESTDIR$desktopdir/org.inkscape.Inkscape.desktop" +install_data desktop-files/rstudio.desktop "$DESTDIR$desktopdir/rstudio.desktop" +install_data desktop-files/meld3.desktop "$DESTDIR$desktopdir/meld3.desktop" +install_data desktop-files/ugene.desktop "$DESTDIR$desktopdir/ugene.desktop" +install_data desktop-files/org.octave.Octave.desktop "$DESTDIR$desktopdir/org.octave.Octave.desktop" +install_data desktop-files/igv.desktop "$DESTDIR$desktopdir/igv.desktop" + +update-desktop-database "$DESTDIR$desktopdir" + exit