#!/usr/bin/env bash # coding=utf-8 # # Install this app into the current user's home directory. set -euo pipefail cargo build --locked --release cargo test --locked --release bin_dir="${HOME}/.local/bin" xdg_data_home="${XDG_DATA_HOME:-${HOME}/.local/share}" install -Dm755 \ -t "${bin_dir}" \ "target/release/killjoy-notifier-notification" install -Dm644 \ -t "${xdg_data_home}/systemd/user" \ "package/session/killjoy-notifier-notification.service" sed -i "s|ExecStart=/usr/bin/killjoy-notifier-notification|ExecStart=${bin_dir}/killjoy-notifier-notification|" \ "${xdg_data_home}/systemd/user/killjoy-notifier-notification.service" install -Dm644 \ -t "${xdg_data_home}/dbus-1/services" \ "package/session/name.jerebear.KilljoyNotifierNotification1.service" systemctl --user daemon-reload