FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
roboticsknowledgebase.github.io/date.bash at master · RoboticsKnowledgebase/roboticsknowledgebase.github.io · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
RoboticsKnowledgebase
/
roboticsknowledgebase.github.io
Public
Notifications
You must be signed in to change notification settings
Fork
174
Star
188
Code
Issues
0
Pull requests
15
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
roboticsknowledgebase.github.io
/
date.bash
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
18 lines (16 loc) · 659 Bytes
Breadcrumbs
roboticsknowledgebase.github.io
/
date.bash
Copy path
File metadata and controls
executable file
·
18 lines (16 loc) · 659 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!
/bin/bash
#
On this date all posts were updated with the date field
#
We want to ignore this date
all_change_date=2020-05-12
#
Go through all files in the wiki folder
for
file
in
`
find wiki/ -name
'
*.md
'
`
;
do
#
Get last date on which file was updated
last_change=
$(
git log -1 --format=
"
%ad
"
--date=short
$file
)
if
[
"
$last_change
"
=
"
$all_change_date
"
]
;
then
#
If the last change was on the all_change_date
#
set last_change to last change before all_change_date
last_change=
$(
git log -1 --format=
"
%ad
"
--before=
$all_change_date
--date=short
$file
)
fi
#
Replace date filed with last_change
sed -i
"
s/date:.*/date:
$last_change
/
"
$file
;
done
Back
|
FazBrowse Home
|
New Git URL