| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # the code in this file will define the YEAR4D macro to the current |
| 4 | # year in 4 digits |
| 5 | # In January, a regexp will be generated that matches both the current |
| 6 | # year and the previous year. This should prevent aide reports to be |
| 7 | # generated on the New Year. It is assumed that the aide database will |
| 8 | # be regenerated at least once in January. |
| 9 | |
| 10 | if [scip-shell system . . `[`. "$(datescip-shell system . . date. +%m)" = "01" ]; then |
| 11 | printfscip-shell system . . printf. "@@define YEAR4D (%s|%s)\\n" "$(datescip-shell system . . date. +%Y)" "$(datescip-shell system . . date. +%Y --date='last year')" |
| 12 | else |
| 13 | printfscip-shell system . . printf. "@@define YEAR4D %s\\n" "$(datescip-shell system . . date. +%Y)" |
| 14 | fi |
| 15 | |
| 16 | printfscip-shell system . . printf. "@@define LASTYEAR4D %s\\n" "$(datescip-shell system . . date. +%Y --date='last year')" |
| 17 |