ubuntu 自动编译

前端之家收集整理的这篇文章主要介绍了ubuntu 自动编译前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
由于需要有输入密码的地方需要,需要安装expect @H_301_3@
@H_301_3@
sudoapt-get install expect @H_301_3@
需要用expect 执行的脚本的地方加上 @H_301_3@
expect << ! //开始 @H_301_3@
@H_301_3@
@H_301_3@
! //结束 @H_301_3@
看下边红色标记 @H_301_3@
在copy文件的时候,发现总不能完全执行完就结束了, @H_301_3@
发现是由于,expect 默认timeout为30秒, @H_301_3@
所以添加 set timeout -1 这样为无穷大就可以了 @H_301_3@
看下边紫色标记 @H_301_3@
---------------- @H_301_3@
@H_301_3@
1 #!/bin/bash
2 source /etc/profile @H_301_3@ 3 source ~/.bashrc @H_301_3@ 4 export JAVA_HOME=/home/songhanqing/tools/jdk1.6.0_31 @H_301_3@
7 export PATH=$JAVA_HOME/bin:$PATH
8 export CLASSPATH=,:$JAVA_HOME/lib @H_301_3@ 9 export PATH=$PATH:/usr/local/bin @H_301_3@ 10 export PATH=$PATH:/home/songhanqing/code/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.7/bin @H_301_3@ 11 export PATH=$PATH:/home/songhanqing/bin @H_301_3@ 12 @H_301_3@ 13 cd /home/songhanqing/soft_verison @H_301_3@ 14 rm -rf * @H_301_3@ 15 expect <<! @H_301_3@ 16 spawn repo init -u git://192.168.1.110/jzcode/m200_android4.3/manifest.git -m glass_p0.xml @H_301_3@ 17 expect "*[songhanqing]:*" @H_301_3@ 18 send "\r" @H_301_3@ 19 @H_301_3@ 20 expect "*[songhanqing]*:" @H_301_3@ 21 send "\r" @H_301_3@ 22 send "y\r" @H_301_3@ 2 3 ! @H_301_3@ 24 repo sync @H_301_3@ 25 @H_301_3@ 26 source build/envsetup.sh @H_301_3@ 27 lunch magic-userdebug @H_301_3@ 28 cd bootable/bootloader/uboot @H_301_3@ 29 make coldwave_android_msc0 @H_301_3@ 30 cd /home/songhanqing/soft_verison @H_301_3@ 31 cd ./kernel @H_301_3@ 48 spawn scp @H_301_3@ 32 make magic_lcos_android_defconfig @H_301_3@ 33 make zImage @H_301_3@ 34 cp arch/mips/boot/compressed/zImage ../device/ingenic/magic/kernel @H_301_3@ 35 cd .. @H_301_3@ 36 make bootimage @H_301_3@ 37 make update-api @H_301_3@ 38 make -j8 @H_301_3@ 39 riqi=`date +%Y-%m-%d` @H_301_3@ 40 mkdir -p /home/songhanqing/$riqi @H_301_3@ 41 @H_301_3@ 42 cp /home/songhanqing/soft_verison/bootable/bootloader/uboot/u-boot-with-spl-mbr-gpt.bin /home/songhanqing/$riqi @H_301_3@ 43 cp /home/songhanqing/soft_verison/out/target/product/magic/boot.img /home/songhanqing/$riqi @H_301_3@ 44 cp /home/songhanqing/soft_verison/out/target/product/magic/recovery.img /home/songhanqing/$riqi @H_301_3@ 45 cp /home/songhanqing/soft_verison/out/target/product/magic/system.img /home/songhanqing/$riqi @H_301_3@ 46 expect <<! @H_301_3@ 47 set timeout -1 48 spawn scp -r /home/songhanqing/$riqi supervisiontech@192.168.1.110:/home/ftp/jz_bin 49 expect "*assword:*" 50 send "vision\r" 51 expect 100% 52 expect eof 53 !

猜你在找的Ubuntu相关文章