www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit bd90ef324b9a8e0cc3fb71ff9f2d7c56ba00b896
parent cfc188c61d10e158fdf0f0736f1216eb9f7bece4
Author: Suzanne Soy <ligo@suzanne.soy>
Date:   Mon,  8 Mar 2021 19:15:37 +0000

Merge remote-tracking branch 'origin/patch-sudo-install'

Diffstat:
Minstall.sh | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/install.sh b/install.sh @@ -180,13 +180,18 @@ if [ "$yn" = Y ]; then $SUDO ninja -C build install fi -SESSIONS_DIR=/usr/share/wayland-sessions +SESSIONS_DIR=/usr/share/wayland-sessions/ +SUDO_FOR_SESSIONS=sudo +if [ -w $SESSIONS_DIR ] || ! which sudo > /dev/null; then + SUDO_FOR_SESSIONS= +fi ask_confirmation "Do you want to install wayfire.desktop to $SESSIONS_DIR/ [y/n]? " if [ "$yn" = Y ]; then cp "$BUILDROOT/wayfire.desktop.in" "$BUILDROOT/wayfire.desktop" sed -i "s@^Exec.*@Exec=$PREFIX/bin/startwayfire@g" "$BUILDROOT/wayfire.desktop" sed -i "s@^Icon.*@Icon=$PREFIX/share/wayfire/icons/wayfire.png@g" "$BUILDROOT/wayfire.desktop" - $SUDO install -m 644 "$BUILDROOT/wayfire.desktop" "$SESSIONS_DIR" + $SUDO_FOR_SESSIONS mkdir -p "$SESSIONS_DIR" + $SUDO_FOR_SESSIONS install -m 644 "$BUILDROOT/wayfire.desktop" "$SESSIONS_DIR" fi echo "Installation done. Run $PREFIX/bin/startwayfire to start wayfire."