add lftp apt request
This commit is contained in:
parent
4c36f34f7c
commit
ac0caa733c
118
prepare-build.sh
118
prepare-build.sh
@ -5,6 +5,7 @@ NC='\033[0m' # No Color
|
||||
|
||||
#sudo apt-get install python
|
||||
#sudo apt-get install wiggle
|
||||
sudo apt-get install lftp
|
||||
|
||||
echo -e ${RED} -------- download bromite repo ${NC}
|
||||
git clone https://github.com/bromite/bromite
|
||||
@ -26,58 +27,71 @@ cd ..
|
||||
|
||||
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
|
||||
env
|
||||
|
||||
echo -e ${RED} -------- download chromium repo ${NC}
|
||||
mkdir ./chromium
|
||||
cd ./chromium
|
||||
|
||||
gclient root
|
||||
|
||||
mkdir ./src
|
||||
cd ./src
|
||||
|
||||
git init
|
||||
git remote add origin https://chromium.googlesource.com/chromium/src.git
|
||||
|
||||
git fetch --depth 2 https://chromium.googlesource.com/chromium/src.git +refs/tags/$VERSION:chromium_$VERSION
|
||||
git checkout $VERSION
|
||||
VERSION_SHA=$( git show-ref -s $VERSION | head -n1 )
|
||||
|
||||
echo >../.gclient "solutions = ["
|
||||
echo >>../.gclient " { \"name\" : 'src',"
|
||||
echo >>../.gclient " \"url\" : 'https://chromium.googlesource.com/chromium/src.git@$VERSION_SHA',"
|
||||
echo >>../.gclient " \"deps_file\" : 'DEPS',"
|
||||
echo >>../.gclient " \"managed\" : True,"
|
||||
echo >>../.gclient " \"custom_deps\" : {"
|
||||
echo >>../.gclient " },"
|
||||
echo >>../.gclient " \"custom_vars\": {},"
|
||||
echo >>../.gclient " },"
|
||||
echo >>../.gclient "]"
|
||||
echo >>../.gclient "target_os=['android']"
|
||||
|
||||
git submodule foreach git config -f ./.git/config submodule.$name.ignore all
|
||||
git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
|
||||
#git config diff.ignoreSubmodules all
|
||||
|
||||
echo -e ${RED} -------- sync third_party repos ${NC}
|
||||
gclient sync -D --no-history --nohooks
|
||||
|
||||
git config user.email "you@example.com"
|
||||
git config user.name "Your Name"
|
||||
|
||||
# remove origin for chromium
|
||||
# git remote remove origin
|
||||
|
||||
echo -e ${RED} -------- running hooks ${NC}
|
||||
sudo build/install-build-deps-android.sh
|
||||
gclient runhooks
|
||||
|
||||
echo -e ${RED} -------- packing chromium dir ${NC}
|
||||
cd ../..
|
||||
tar -czf chromium.$VERSION_SHA.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"
|
||||
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
|
||||
if [[ OK -eq 0 ]]; then
|
||||
echo -e ${RED} -------- not found ${NC}
|
||||
|
||||
echo -e ${RED} -------- download chromium repo ${NC}
|
||||
mkdir ./chromium
|
||||
cd ./chromium
|
||||
|
||||
gclient root
|
||||
|
||||
mkdir ./src
|
||||
cd ./src
|
||||
|
||||
git init
|
||||
git remote add origin https://chromium.googlesource.com/chromium/src.git
|
||||
|
||||
git fetch --depth 2 https://chromium.googlesource.com/chromium/src.git +refs/tags/$VERSION:chromium_$VERSION
|
||||
git checkout $VERSION
|
||||
VERSION_SHA=$( git show-ref -s $VERSION | head -n1 )
|
||||
|
||||
echo >../.gclient "solutions = ["
|
||||
echo >>../.gclient " { \"name\" : 'src',"
|
||||
echo >>../.gclient " \"url\" : 'https://chromium.googlesource.com/chromium/src.git@$VERSION_SHA',"
|
||||
echo >>../.gclient " \"deps_file\" : 'DEPS',"
|
||||
echo >>../.gclient " \"managed\" : True,"
|
||||
echo >>../.gclient " \"custom_deps\" : {"
|
||||
echo >>../.gclient " },"
|
||||
echo >>../.gclient " \"custom_vars\": {},"
|
||||
echo >>../.gclient " },"
|
||||
echo >>../.gclient "]"
|
||||
echo >>../.gclient "target_os=['android']"
|
||||
|
||||
git submodule foreach git config -f ./.git/config submodule.$name.ignore all
|
||||
git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
|
||||
#git config diff.ignoreSubmodules all
|
||||
|
||||
echo -e ${RED} -------- sync third_party repos ${NC}
|
||||
gclient sync -D --no-history --nohooks
|
||||
|
||||
git config user.email "you@example.com"
|
||||
git config user.name "Your Name"
|
||||
|
||||
# remove origin for chromium
|
||||
# git remote remove origin
|
||||
|
||||
echo -e ${RED} -------- running install-build-deps-android ${NC}
|
||||
sudo build/install-build-deps-android.sh
|
||||
|
||||
echo -e ${RED} -------- running hooks ${NC}
|
||||
gclient runhooks
|
||||
|
||||
echo -e ${RED} -------- packing chromium dir ${NC}
|
||||
cd ../..
|
||||
tar -czf chromium.$VERSION_SHA.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"
|
||||
else
|
||||
echo -e ${RED} -------- unpacking ${NC}
|
||||
|
||||
tar xf chromium.$VERSION_SHA.tar.gz
|
||||
fi
|
||||
|
||||
rm chromium.$VERSION_SHA.tar.gz
|
||||
cd chromium/src
|
||||
|
Loading…
Reference in New Issue
Block a user