From 178718b87135c100ebb7909bdfdabd3b1839afe1 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Fri, 3 Aug 2018 11:44:38 +0800 Subject: [PATCH] feat(combine): add alternative address output --- checker.sh | 100 ++++++++++++++++++++++++++++++++++++++++++----------- combine.sh | 90 +++++++++++++++++++++++++++++++---------------- 2 files changed, 141 insertions(+), 49 deletions(-) diff --git a/checker.sh b/checker.sh index 92f438a..8401483 100644 --- a/checker.sh +++ b/checker.sh @@ -2,68 +2,128 @@ mkdir ./public mkdir ./tmp echo '-------------------------------------' -echo 'Checking Chrome Stable arm Android ......' +echo 'Checking Chrome Stable x86 ......' echo '-------------------------------------' -echo '' curl "https://tools.google.com/service/update2" --data " - - + + - " > ./tmp/stable-arm.unformat.xml + " > ./tmp/stable-x86.unformat.xml echo '' echo '-------------------------------------' -echo 'Checking Chrome Beta arm Android ......' +echo 'Checking Chrome Stable x64 ......' echo '-------------------------------------' -echo '' curl "https://tools.google.com/service/update2" --data " - - + + - " > ./tmp/beta-arm.unformat.xml + " > ./tmp/stable-x64.unformat.xml echo '' echo '-------------------------------------' -echo 'Checking Chrome Dev arm Android ......' +echo 'Checking Chrome Beta x86 ......' echo '-------------------------------------' -echo '' curl "https://tools.google.com/service/update2" --data " - - + + - " > ./tmp/dev-arm.unformat.xml + " > ./tmp/beta-x86.unformat.xml echo '' echo '-------------------------------------' -echo 'Checking Chrome Canary arm Android ......' +echo 'Checking Chrome Beta x64 ......' echo '-------------------------------------' -echo '' curl "https://tools.google.com/service/update2" --data " - - + + - " > ./tmp/canary-arm.unformat.xml + " > ./tmp/beta-x64.unformat.xml + +echo '' +echo '-------------------------------------' +echo 'Checking Chrome Dev x86 ......' +echo '-------------------------------------' + +curl "https://tools.google.com/service/update2" --data " + + + + + + + " > ./tmp/dev-x86.unformat.xml + +echo '' +echo '-------------------------------------' +echo 'Checking Chrome Dev x64 ......' +echo '-------------------------------------' + +curl "https://tools.google.com/service/update2" --data " + + + + + + + " > ./tmp/dev-x64.unformat.xml + +echo '' +echo '-------------------------------------' +echo 'Checking Chrome Canary x86 ......' +echo '-------------------------------------' + +curl "https://tools.google.com/service/update2" --data " + + + + + + + " > ./tmp/canary-x86.unformat.xml + +echo '' +echo '-------------------------------------' +echo 'Checking Chrome Canary x64 ......' +echo '-------------------------------------' + +curl "https://tools.google.com/service/update2" --data " + + + + + + + " > ./tmp/canary-x64.unformat.xml \ No newline at end of file diff --git a/combine.sh b/combine.sh index 5d50f2f..579c283 100644 --- a/combine.sh +++ b/combine.sh @@ -2,19 +2,21 @@ echo '' echo '-------------------------------------' echo 'Formatting XML Files ......' echo '-------------------------------------' -echo '' cd ./tmp -xmllint --format stable-arm.unformat.xml > stable-arm.format.xml -xmllint --format beta-arm.unformat.xml > beta-arm.format.xml -xmllint --format dev-arm.unformat.xml > dev-arm.format.xml -xmllint --format canary-arm.unformat.xml > canary-arm.format.xml +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 '' > chrome.tmp.xml @@ -23,29 +25,61 @@ echo '' >> chrome.tmp.xml DATE="$(echo $(date --rfc-2822))" echo '' >> chrome.tmp.xml @@ -53,7 +87,6 @@ echo '' echo '-------------------------------------' echo 'Formatting Output ......' echo '-------------------------------------' -echo '' sed -i 's|">|"/>|g' chrome.tmp.xml xmllint --format chrome.tmp.xml > chrome.xml @@ -62,11 +95,10 @@ 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 .. +cd .. \ No newline at end of file