#!/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-logfile" install -Dm644 \ -t "${xdg_data_home}/systemd/user" \ "package/session/killjoy-notifier-logfile.service" sed -i "s|ExecStart=/usr/bin/killjoy-notifier-logfile|ExecStart=${bin_dir}/killjoy-notifier-logfile|" \ "${xdg_data_home}/systemd/user/killjoy-notifier-logfile.service" install -Dm644 \ -t "${xdg_data_home}/dbus-1/services" \ "package/session/name.jerebear.KilljoyNotifierLogfile1.service" systemctl --user daemon-reload