10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00

Create the metarecover tool

This commit is contained in:
Mickaël Véril 2020-03-05 14:52:42 +01:00
parent b9822026c4
commit 4d4bf40b0b

10
tools/metarecover.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
files=$(git status -s | grep " M " | cut -c4- | grep 'static/data/')
for file in $files; do
show="$(git --no-pager show HEAD~1:$file)"
IFS=$'\n' lines=($show)
for (( i=0; i<=5; i++ )) ;do
line=${lines[i]}
sed -i "$((i+1))s|^.*$|$line|" $file
done
done