feat: clean the parse result by build.sh

This commit is contained in:
SukkaW 2018-08-03 15:12:00 +08:00
parent 10f61bba46
commit 8aa0d264cb
4 changed files with 16 additions and 3 deletions

View file

@ -4,8 +4,11 @@ install:
- sudo apt-get --yes install libxml2-utils - sudo apt-get --yes install libxml2-utils
script: script:
- chmod +x ./checker.sh - chmod +x ./checker.sh
- chmod +x ./deploy.sh
- chmod +x ./combine.sh - chmod +x ./combine.sh
- chmod +x ./xmlparser.sh
- chmod +x ./build.sh
- chmod +x ./deploy.sh
- ./checker.sh - ./checker.sh
- ./combine.sh - ./combine.sh
- ./xmlparser.sh public/chrome.xml > tmp/chrome_xml_parser_result.txt
- ./deploy.sh > /dev/null - ./deploy.sh > /dev/null

10
build.sh Normal file
View file

@ -0,0 +1,10 @@
sed -i 's| ELEMENT=manifest ATTRIBUTE=version VALUE=||g' tmp/chrome_xml_parser_result.txt
sed -i 's| ELEMENT=url ATTRIBUTE=codebase VALUE=||g' tmp/chrome_xml_parser_result.txt
sed -i 's| ATTRIBUTE=hash |\n|g' tmp/chrome_xml_parser_result.txt
sed -i 's| ATTRIBUTE=name VALUE=|\n|g' tmp/chrome_xml_parser_result.txt
sed -i 's| ATTRIBUTE=required VALUE=true ATTRIBUTE=size VALUE=|\n|g' tmp/chrome_xml_parser_result.txt
sed -i 's| ATTRIBUTE=hash_sha256 VALUE=|\n|g' tmp/chrome_xml_parser_result.txt
sed -i 's| ELEMENT=time ATTRIBUTE=checktime VALUE=||g' tmp/chrome_xml_parser_result.txt
sed -i 's| ||g' tmp/chrome_xml_parser_result.txt
checktime=$(sed -n '3p' ./tmp/chrome_xml_parser_result.txt)

View file

@ -22,7 +22,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' > chrome.tmp.xml
echo '<chromechecker>' >> chrome.tmp.xml echo '<chromechecker>' >> chrome.tmp.xml
DATE="$(echo $(date --rfc-2822))" DATE="$(echo $(date '+%Y-%m-%d_%H:%M:%S'))"
echo '<time checktime="'$DATE'"/>' >> chrome.tmp.xml echo '<time checktime="'$DATE'"/>' >> chrome.tmp.xml
echo '<stable86>' >> chrome.tmp.xml echo '<stable86>' >> chrome.tmp.xml

File diff suppressed because one or more lines are too long