File: task_functions.sh

package info (click to toggle)
task 2.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,588 kB
  • ctags: 8,723
  • sloc: cpp: 36,161; python: 11,324; perl: 8,697; ansic: 7,400; sh: 673; makefile: 19
file content (26 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CONFIRM_PROMPT='are you sure'
task_config ()
{
    var="${1}"
    shift
    value="${@}"
    echo y | task config $var "$value" | grep -iv "$CONFIRM_PROMPT"
}
task_vars ()
{
    task _show | grep "^.*${1}.*=" | cut -d'=' -f1
}
task_get ()
{
    task _show | grep "^${1}=" | cut -d'=' -f2
}
task_color ()
{
    color="${1}"
    shift
    text="${@}"
    task rc.verbose=nothing rc._forcecolor=yes color ${color} | grep 'task color' | \
       tail -n 1 | sed -e 's/^  //' -e "s/task color ${color}/${text}/"
}