diff options
| -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 |