mirror of
https://github.com/GiriNeko/CheckChrome.git
synced 2025-12-16 13:17:15 +00:00
feat: combine all data into one xml
This commit is contained in:
parent
6fa38a1b6a
commit
5fa73d9bad
2 changed files with 109 additions and 13 deletions
22
checker.sh
22
checker.sh
|
|
@ -1,4 +1,5 @@
|
|||
mkdir ./public
|
||||
mkdir ./tmp
|
||||
|
||||
echo '-------------------------------------'
|
||||
echo 'Checking Chrome Stable x86 ......'
|
||||
|
|
@ -14,7 +15,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='-multi-chrome' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/stable-x86.xml
|
||||
</request>" > ./tmp/stable-x86.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -31,7 +32,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='x64-stable-multi-chrome' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/stable-x64.xml
|
||||
</request>" > ./tmp/stable-x64.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -48,7 +49,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='1.1-beta' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/beta-x86.xml
|
||||
</request>" > ./tmp/beta-x86.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -65,7 +66,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='x64-beta-multi-chrome' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/beta-x64.xml
|
||||
</request>" > ./tmp/beta-x64.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -82,7 +83,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='2.0-dev' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/dev-x86.xml
|
||||
</request>" > ./tmp/dev-x86.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -99,7 +100,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{8A69D345-D564-463C-AFF1-A69D9E530F96}' ap='x64-dev-multi-chrome' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/dev-x64.xml
|
||||
</request>" > ./tmp/dev-x64.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -116,7 +117,7 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{4EA16AC7-FD5A-47C3-875B-DBF4A2008C20}' ap='' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/canary-x86.xml
|
||||
</request>" > ./tmp/canary-x86.unformat.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
|
|
@ -133,9 +134,4 @@ curl "https://tools.google.com/service/update2" --data "<?xml version='1.0' enco
|
|||
<app appid='{4EA16AC7-FD5A-47C3-875B-DBF4A2008C20}' ap='x64-canary' version='' nextversion='' lang='' brand='GGLS' client=''>
|
||||
<updatecheck/>
|
||||
</app>
|
||||
</request>" > ./public/canary-x64.xml
|
||||
|
||||
DATE="$(echo $(date --rfc-2822))"
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?><time>' > ./public/checktime.xml
|
||||
echo $DATE >> ./public/checktime.xml
|
||||
echo '</time>' >> ./public/checktime.xml
|
||||
</request>" > ./tmp/canary-x64.unformat.xml
|
||||
|
|
|
|||
100
combine.sh
Normal file
100
combine.sh
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
echo ''
|
||||
echo '-------------------------------------'
|
||||
echo 'Formatting XML Files ......'
|
||||
echo '-------------------------------------'
|
||||
echo ''
|
||||
|
||||
cd ./tmp
|
||||
xmllint --format stable-x86.unformat.xml > stable-x86.format.xml
|
||||
xmllint --format stable-x64.unformat.xml > stable-x64.format.xml
|
||||
xmllint --format beta-x86.unformat.xml > beta-x86.format.xml
|
||||
xmllint --format beta-x64.unformat.xml > beta-x64.format.xml
|
||||
xmllint --format dev-x86.unformat.xml > dev-x86.format.xml
|
||||
xmllint --format dev-x64.unformat.xml > dev-x64.format.xml
|
||||
xmllint --format canary-x86.unformat.xml > canary-x86.format.xml
|
||||
xmllint --format canary-x64.unformat.xml > canary-x64.format.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
echo 'Combining XML Files ......'
|
||||
echo '-------------------------------------'
|
||||
echo ''
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' > chrome.tmp.xml
|
||||
|
||||
echo '<chromechecker>' >> chrome.tmp.xml
|
||||
|
||||
DATE="$(echo $(date --rfc-2822))"
|
||||
echo '<time checktime="'$DATE'"/>' >> chrome.tmp.xml
|
||||
|
||||
echo '<stable86>' >> chrome.tmp.xml
|
||||
cat stable-x86.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat stable-x86.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat stable-x86.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</stable86>' >> chrome.tmp.xml
|
||||
|
||||
echo '<stable64>' >> chrome.tmp.xml
|
||||
cat stable-x64.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat stable-x64.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat stable-x64.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</stable64>' >> chrome.tmp.xml
|
||||
|
||||
echo '<beta86>' >> chrome.tmp.xml
|
||||
cat beta-x86.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat beta-x86.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat beta-x86.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</beta86>' >> chrome.tmp.xml
|
||||
|
||||
echo '<beta64>' >> chrome.tmp.xml
|
||||
cat beta-x64.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat beta-x64.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat beta-x64.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</beta64>' >> chrome.tmp.xml
|
||||
|
||||
echo '<dev86>' >> chrome.tmp.xml
|
||||
cat dev-x86.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat dev-x86.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat dev-x86.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</dev86>' >> chrome.tmp.xml
|
||||
|
||||
echo '<dev64>' >> chrome.tmp.xml
|
||||
cat dev-x64.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat dev-x64.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat dev-x64.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</dev64>' >> chrome.tmp.xml
|
||||
|
||||
echo '<canary86>' >> chrome.tmp.xml
|
||||
cat canary-x86.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat canary-x86.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat canary-x86.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</canary86>' >> chrome.tmp.xml
|
||||
|
||||
echo '<canary64>' >> chrome.tmp.xml
|
||||
cat canary-x64.format.xml | grep '<manifest version' >> chrome.tmp.xml
|
||||
cat canary-x64.format.xml | grep '<url codebase="https://dl.google.com/' >> chrome.tmp.xml
|
||||
cat canary-x64.format.xml | grep '<package fp' >> chrome.tmp.xml
|
||||
echo '</canary64>' >> chrome.tmp.xml
|
||||
|
||||
echo '</chromechecker>' >> chrome.tmp.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
echo 'Formatting Output ......'
|
||||
echo '-------------------------------------'
|
||||
echo ''
|
||||
|
||||
sed -i 's|">|"/>|g' chrome.tmp.xml
|
||||
xmllint --format chrome.tmp.xml > chrome.xml
|
||||
|
||||
echo ''
|
||||
echo '-------------------------------------'
|
||||
echo 'Compressing Output ......'
|
||||
echo '-------------------------------------'
|
||||
echo ''
|
||||
|
||||
xmllint --noblanks chrome.xml > chrome.min.xml
|
||||
|
||||
cp -rf ./chrome.xml ../public/chrome.xml
|
||||
cp -rf ./chrome.min.xml ../public/chrome.min.xml
|
||||
|
||||
cd ..
|
||||
Loading…
Add table
Add a link
Reference in a new issue