File: on-exit

package info (click to toggle)
task 2.6.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 7,076 kB
  • sloc: cpp: 45,964; python: 12,713; sh: 785; perl: 189; makefile: 21
file content (23 lines) | stat: -rwxr-xr-x 407 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# The on-exit event is triggered once, after all processing is complete.
# This hook script has no effect on processing.

# Input:
# - line of JSON for each modified task

# Output:
# - Optional feedback/error.

n=0
while read modified_task
do
  n=$(($n + 1))
done

echo "on-exit: Counted $n added/modified tasks."

# Status:
# - 0:     Non-JSON is feedback.
# - non-0: Non-JSON is error.
exit 0