キャロウ マーク | c966dbc | 2016-03-14 16:12:38 +0900 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
Mark Callow | 41b7995 | 2016-03-14 16:38:46 +0900 | [diff] [blame] | 3 | # Smudge driver for the inserting a date where <span id="LastEditDate"></span> |
| 4 | # is found. |
キャロウ マーク | c966dbc | 2016-03-14 16:12:38 +0900 | [diff] [blame] | 5 | |
キャロウ マーク | c3b7fc6 | 2016-03-15 19:08:02 +0900 | [diff] [blame] | 6 | # Copyright (c) 2016 The Khronos Group Inc. |
| 7 | # |
| 8 | # Permission is hereby granted, free of charge, to any person obtaining a |
| 9 | # copy of this software and/or associated documentation files (the |
| 10 | # "Materials"), to deal in the Materials without restriction, including |
| 11 | # without limitation the rights to use, copy, modify, merge, publish, |
| 12 | # distribute, sublicense, and/or sell copies of the Materials, and to |
| 13 | # permit persons to whom the Materials are furnished to do so, subject to |
| 14 | # the following conditions: |
| 15 | # |
| 16 | # The above copyright notice and this permission notice shall be included |
| 17 | # in all copies or substantial portions of the Materials. |
| 18 | # |
| 19 | # THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 22 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 23 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 24 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 25 | # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 26 | |
キャロウ マーク | c966dbc | 2016-03-14 16:12:38 +0900 | [diff] [blame] | 27 | last_date=$(git log --pretty=format:"%ad" -1 HEAD -- "$1") |
| 28 | sed -e 's/\(<span id=\"LastEditDate\">\).*\(<\/span>\)/\1'"$last_date"'\2/' |
| 29 | |