You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
351 B
14 lines
351 B
2 years ago
|
#!/bin/sh
|
||
|
|
||
|
# Date in RFC5322 on UTC TZ
|
||
|
CURR_DATE=$(date --utc --iso-8601=seconds)
|
||
|
UPDATED_FILTERS=$(git status --porcelain filters | awk 'match($1, "A") || match($1, "M") || match($1, "?") {print $2}')
|
||
|
|
||
|
OLDIFS="$IFS"
|
||
|
IFS="
|
||
|
"
|
||
|
for filter in $UPDATED_FILTERS; do
|
||
|
sed -i "s/! Last modified:.*/! Last modified: $CURR_DATE/g" "$filter"
|
||
|
done
|
||
|
IFS="$OLDIFS"
|