diff options
| author | Nathan Reiner <nathan@nathanreinerxyz> | 2022-06-11 15:31:09 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreinerxyz> | 2022-06-11 15:31:09 +0200 |
| commit | f90c34cd86046fcb8d20259331fd7e405fb7ff42 (patch) | |
| tree | d53290ab6cd12f5bf0209d3655f69c477d325cc8 | |
| parent | d01b8ee2cebe3d05a2e16ec2e90b2d683585270f (diff) | |
add install system
| -rwxr-xr-x | status | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -49,8 +49,23 @@ help() { echo " -d - run daemon" } +install_unit() { + printf "prefix: " + read prefix + ln -s "$HOME/.local/bin/$1" "$HOME/.local/share/status/$prefix$1" +} + +remove_unit() { + unit=$(ls ~/.local/share/status/*$1) + printf "remove unit $unit? [Y/n]" + read $response + [ -z "$response" -o "$response" = "Y" ] && rm "$unit" +} + case "$1" in -d) daemon;; -u) echo "update $2" > $CMDFIFO;; -h) help;; + -i)install_unit $2;; + -r)remove_unit $2;; esac |