File: on-modify

package info (click to toggle)
task 3.4.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,332 kB
  • sloc: cpp: 42,567; python: 12,689; sh: 775; perl: 189; makefile: 35
file content (21 lines) | stat: -rwxr-xr-x 564 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# The on-modify event is triggered separately for each task modified. This hook
# script can accept/reject the modification. Processing will continue.

# Input:
# - line of JSON for the original task
# - line of JSON for the modified task, the diff being the modification
read -r original_task
read -r modified_task

# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
printf "%s" "$modified_task"
printf "%s" 'on-modify'

# Status:
# - 0:     JSON accepted, non-JSON is feedback.
# - non-0: JSON ignored, non-JSON is error.
exit 0