fix version, upload script apply patch

This commit is contained in:
Your Name 2021-05-29 09:10:33 +00:00
parent ac0caa733c
commit 050e69d2bc
2 changed files with 32 additions and 8 deletions

24
apply-bromite-patches.sh Normal file
View File

@ -0,0 +1,24 @@
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
sudo apt install sed
cd chromium/src
echo -e ${RED} ------- apply patchs ${NC}
for file in $(cat ../../bromite/build/bromite_patches_list.txt) ; do
echo -e ${RED} " -> Apply $file" ${NC}
REPL="0,/^---/s//FILE:"$file"\n---/"
cat ../../bromite/build/patches/$file | sed $REPL | git am
if [ $? -ne 0 ]
then
echo -e "Error on ../../bromite/build/patches/${file}"
exit 1
fi
echo " "
done

View File

@ -14,7 +14,7 @@ git fetch
git pull
VERSION=$( cat ./build/RELEASE )
echo -e ${RED} -------- lastest version is: $VERSION ${NC}
echo -e ${RED} -------- chromium version is: $VERSION ${NC}
echo -e ${RED} -------- cloning depot_tools ${NC}
cd ..
@ -29,8 +29,8 @@ echo -e ${RED} -------- set envs ${NC}
PATH=$PWD/chromium/src/third_party/llvm-build/Release+Asserts/bin:$PWD/depot_tools/:/usr/local/go/bin:$PATH
echo -e ${RED} -------- cheking chromium pre-prepared ${NC}
rm chromium.$VERSION_SHA.tar.gz
lftp $FTP_HOST -u $FTP_USER,$FTP_PWD -e "set ftp:ssl-force true; set ssl:verify-certificate false; cd /bromite; get chromium.$VERSION_SHA.tar.gz; quit" && OK=1 || OK=0
rm chromium.$VERSION.tar.gz
lftp $FTP_HOST -u $FTP_USER,$FTP_PWD -e "set ftp:ssl-force true; set ssl:verify-certificate false; cd /bromite; get chromium.$VERSION.tar.gz; quit" && OK=1 || OK=0
if [[ OK -eq 0 ]]; then
echo -e ${RED} -------- not found ${NC}
@ -83,15 +83,15 @@ if [[ OK -eq 0 ]]; then
echo -e ${RED} -------- packing chromium dir ${NC}
cd ../..
tar -czf chromium.$VERSION_SHA.tar.gz ./chromium
tar -czf chromium.$VERSION.tar.gz ./chromium
echo -e ${RED} -------- uploading to storage ${NC}
lftp $FTP_HOST -u $FTP_USER,$FTP_PWD -e "set ftp:ssl-force true; set ssl:verify-certificate false; cd /bromite; put chromium.$VERSION_SHA.tar.gz; quit"
lftp $FTP_HOST -u $FTP_USER,$FTP_PWD -e "set ftp:ssl-force true; set ssl:verify-certificate false; cd /bromite; put chromium.$VERSION.tar.gz; quit"
else
echo -e ${RED} -------- unpacking ${NC}
tar xf chromium.$VERSION_SHA.tar.gz
tar xf chromium.$VERSION.tar.gz
fi
rm chromium.$VERSION_SHA.tar.gz
cd chromium/src
rm chromium.$VERSION.tar.gz