# // try to used this blog - Demo - write mode
export PALORIS_INET=$1
export INET_DEBUG=$3
echo $PALORIS_INET
echo $2
sleep 3
make__mmm=0
make__snod=0
for count_i in $@
do
if [ "$count_i" = "mmm" ] ;then
export PALORIS_INET=$1
make__mmm=1
echo " PALORIS_INET self project target = $1 ... "
elif [ "$count_i" = "m" ] ;then
echo " PALORIS_INET default D701C project target ... "
export PALORIS_INET=D701C
make__mmm=1
fi
if [ "$count_i" = "snod" ] ;then
echo " PALORIS_INET make__snod project target ... "
make__mmm=0
make__snod=1
fi
if [ "$count_i" = "ota" ] ;then
echo " PALORIS_INET make__snod project target ... "
make__mmm=0
make__ota=1
fi
if [ "$count_i" = "md5" ] ;then
echo " PALORIS_INET md5 project target ... "
echo ...
DATE=`date`
TMAX=`date +%B%d%y`
TMIN=`date +%H%M`
TTMP=`date +%Y%m`
RENAME="$TMAX-$TMIN.BAK"
Odate1=`date +%Y%m%d`
Opath1="out/target/product/polaris-inet/polaris_inet-ota-$Odate1.zip"
Opath2="out/target/product/polaris-ibt/polaris_ibt-ota-$Odate1.zip"
Opathx1=out/target/product/polaris-inet/update.zip
Opathx2=out/target/product/polaris-inet/update.zip
# Otarget1="$Opath1-$Odate1.zip"
# echo == $Opath1 $Opath2 ==
if [ -e $Opath1 ] ;then
ls -al $Opath1
fi
if [ -e $Opath2 ] ;then
ls -al $Opath2
fi
# checkfile2=`ls ./*.log` # checkfile1=`ls ./*.txt`
#
checkfile2=`find ./ -maxdepth 1 -name "*.log" `
checkfile1=`find ./ -maxdepth 1 -name "*.txt" `
#echo == $checkfilex checkfile2 $checkfile1 ==
mkdir -p ./save4MD5-$TTMP
for xi in $checkfile1
do
#echo == ./$xi ==
mv ./$xi ./save4MD5-$TTMP
done
## mv ./*.txt ./save4MD5-$TTMP
##
for xi in $checkfile2
do
mv ./$xi ./save4MD5-$TTMP
done
echo " now , get value of MD5 for update.zip ... " >> ./MD5_debug_$RENAME.txt
echo " ===== " >> ./MD5_debug_$RENAME.txt
echo ...
md5sum $Opath1
md5sum $Opath1 >> ./MD5_debug_$RENAME.txt
echo ...
if [ -d $Opathx1 ] ;then
md5sum $Opathx1
md5sum $Opathx1 >> ./MD5_debug_$RENAME.txt
ls -al $Opathx1
ls -al $Opathx1 >> ./MD5_debug_$RENAME.txt
fi
echo ...
echo " ===$DATE== "
echo " now , get value of MD5 for update.zip done! "
echo " ===$DATE== " >> ./MD5_debug_$RENAME.txt
echo " now , get value of MD5 for update.zip done! " >> ./MD5_debug_$RENAME.txt
# tar -cf ./debug_$RENAME.tar.gz *.ini tar -rf ./debug_$RENAME.tar.gz *.ini
tar -cf ./debug_$TTMP.tar.gz *.txt save4MD5-$TTMP
ls ./save4MD5-$TTMP
# ./save4MD5-$TTMP
make__mmm=0
make__ota=0
make__snod=0
make__md5=1
break
fi
done
if [ $make__snod = 1 ] ;then
make__mmm=0
make__snod=1
#
make__ota=0
fi
if [ "$make__ota" = 1 ] ;then
make__mmm=0
#
make__snod=0
make__ota=1
fi
if [ "$make__md5" = "1" ] ;then
echo " now , get value of MD5 for update.zip done! "
else
echo " step 1 set env ... "
source build/envsetup.sh
echo " step 2 set X args ... "
## lunch polaris_inet-eng
lunch polaris_inet-userdebug
fi
if [ "$make__mmm" = "1" ] ;then
echo " we meet mmm and will be return ... "
# return 0
elif [ "$make__snod" = "1" ] ;then
echo " we meet snod and will be pack ... "
echo " step 3 set bsp-kernel ... "
extract-bsp
echo " step 4 make -jx ... "
make snod
echo " step pack all ... "
pack $2
elif [ "$make__ota" = "1" ] ;then
echo " we meet make__ota and will be get zip ... "
./inet_ota_need_files.sh
echo " step 3 set bsp-kernel ... "
extract-bsp
echo " step 4 make otapackage ... "
make otapackage
echo " otapackage over now ... "
./inet_ota_rm_files.sh
else # ======================
echo " "
echo " nothing "
echo " "
#echo " step 3 set bsp-kernel ... "
# extract-bsp
# echo " step 4 make -jx ... "
# make -j8
#echo " step pack all ... "
# pack $2
fi # ======================
echo " step date before all over "
date
echo "$PALORIS_INET finish"
# // try to used this blog - Demo - write mode
#include stdio.sh
void main(){
printf("see Hello World");
return ;
}