build: Drop makerecipe/mk_timer from envsetup
Change-Id: I5c15e2f509f69abb3cf993aaab945da47098f3da
This commit is contained in:
@@ -1,32 +1,3 @@
|
|||||||
function mk_timer()
|
|
||||||
{
|
|
||||||
local start_time=$(date +"%s")
|
|
||||||
$@
|
|
||||||
local ret=$?
|
|
||||||
local end_time=$(date +"%s")
|
|
||||||
local tdiff=$(($end_time-$start_time))
|
|
||||||
local hours=$(($tdiff / 3600 ))
|
|
||||||
local mins=$((($tdiff % 3600) / 60))
|
|
||||||
local secs=$(($tdiff % 60))
|
|
||||||
local ncolors=$(tput colors 2>/dev/null)
|
|
||||||
echo
|
|
||||||
if [ $ret -eq 0 ] ; then
|
|
||||||
echo -n "#### make completed successfully "
|
|
||||||
else
|
|
||||||
echo -n "#### make failed to build some targets "
|
|
||||||
fi
|
|
||||||
if [ $hours -gt 0 ] ; then
|
|
||||||
printf "(%02g:%02g:%02g (hh:mm:ss))" $hours $mins $secs
|
|
||||||
elif [ $mins -gt 0 ] ; then
|
|
||||||
printf "(%02g:%02g (mm:ss))" $mins $secs
|
|
||||||
elif [ $secs -gt 0 ] ; then
|
|
||||||
printf "(%s seconds)" $secs
|
|
||||||
fi
|
|
||||||
echo " ####"
|
|
||||||
echo
|
|
||||||
return $ret
|
|
||||||
}
|
|
||||||
|
|
||||||
# check to see if the supplied product is one we can build
|
# check to see if the supplied product is one we can build
|
||||||
function check_product()
|
function check_product()
|
||||||
{
|
{
|
||||||
@@ -427,28 +398,6 @@ function installrecovery()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function makerecipe() {
|
|
||||||
if [ -z "$1" ]
|
|
||||||
then
|
|
||||||
echo "No branch name provided."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
cd android
|
|
||||||
sed -i s/'default revision=.*'/'default revision="refs\/heads\/'$1'"'/ default.xml
|
|
||||||
git commit -a -m "$1"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
repo forall -c '
|
|
||||||
|
|
||||||
if [ "$REPO_REMOTE" = "github" ]
|
|
||||||
then
|
|
||||||
pwd
|
|
||||||
lineageremote
|
|
||||||
git push lineage HEAD:refs/heads/'$1'
|
|
||||||
fi
|
|
||||||
'
|
|
||||||
}
|
|
||||||
|
|
||||||
function lineagegerrit() {
|
function lineagegerrit() {
|
||||||
if [ "$(basename $SHELL)" = "zsh" ]; then
|
if [ "$(basename $SHELL)" = "zsh" ]; then
|
||||||
# zsh does not define FUNCNAME, derive from funcstack
|
# zsh does not define FUNCNAME, derive from funcstack
|
||||||
|
Reference in New Issue
Block a user