备份我的源码编译的sh文件

编译命令写一次就可以了。以后直接使用。

01-extra_source_here.sh

#!/bin/sh
echo press enter to continue...
read need

if [ ! -d "WORKING_DIRECTORY_4.0.3" ]; then
mkdir WORKING_DIRECTORY_4.0.3
fi

echo alreadey maked the directory WORKING_DIRECTORY_4.0.3
echo press enter to list the files at /home/osvup/workspace
read need

echo ---------------START
ls -la ../../osvup/workspace/
echo ---------------END

echo are you sure you want to Extrea the WORKING_DIRECTORY_4.0.3.tar.gz file to here?\(y/n\)
read need
case $need in
y)
	echo you enter yes\(y\)
	tar -zxvf ../../osvup/workspace/WORKING_DIRECTORY_4.0.3.tar.gz -C ./WORKING_DIRECTORY_4.0.3
	;;
n)
	echo you enter no\(n\)
	;;
*)
	#do anything you want as default(direct enter)
	echo you enter neither yes\(y\) or no\(n\)
	;;
esac

02-build_source.sh

#!/bin/sh
echo press enter key to continue...
read need
cd WORKING_DIRECTORY_4.0.3

#sudo dpkg-reconfigure dash
source build/envsetup.sh
lunch 1
make -j8

03-run_emulator.sh

#!/bin/sh
echo press enter key to continue...
read need
cd WORKING_DIRECTORY_4.0.3

#sudo dpkg-reconfigure dash
source build/envsetup.sh
lunch 1
emulator &

你可能感兴趣的:(android,ubuntu,Build,sh)