diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-09-08 09:47:40 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-09-08 11:01:14 +0300 |
commit | 4a0a1824cc0808b84845c0910e470c80d5503334 (patch) | |
tree | 3d1e1f9c19aeb6df3698c02e51bca8a91870d966 /etc/library.sh | |
parent | 6e63b55274b41753de9f9e008a052afb1ade8a73 (diff) |
backend: is_active() functionalityv0.26.20
Diffstat (limited to 'etc/library.sh')
-rwxr-xr-x | etc/library.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/library.sh b/etc/library.sh index ad4f0072..bd45b4f5 100755 --- a/etc/library.sh +++ b/etc/library.sh @@ -210,6 +210,17 @@ function activate_script() launch_script "$SCRIPT" } +function is_active_script() +{ + ( + local SCRIPT=$1 + unset is_active + source "$SCRIPT" + grep -q "^ACTIVE_=yes" "$SCRIPT" && return 0 + [[ $( type -t is_active ) == function ]] && is_active + ) +} + function launch_script() { ( |