Merge "idegen: Add darwin support for index-gen"
am: ad14f556e2
Change-Id: I75f9234f76fa3eeda43e0bf85f95ac12f6bd0d47
This commit is contained in:
@@ -42,7 +42,16 @@ tmp_file=${root_dir}/tmp.txt
|
|||||||
dest_file=${root_dir}/module-index.txt
|
dest_file=${root_dir}/module-index.txt
|
||||||
|
|
||||||
echo "Generating index file $dest_file..."
|
echo "Generating index file $dest_file..."
|
||||||
start=$(($(date +%s%N) / 1000000))
|
|
||||||
|
[[ "$(uname -s)" == "Darwin" ]] && darwin=1 || darwin=0
|
||||||
|
|
||||||
|
if [ $darwin == 1 ];
|
||||||
|
then
|
||||||
|
start=$(($(date +%s) / 1000000))
|
||||||
|
else
|
||||||
|
start=$(($(date +%s%N) / 1000000))
|
||||||
|
fi
|
||||||
|
|
||||||
find $root_dir -name '*.mk' \( ! -path "$root_dir/build*" -prune \) \
|
find $root_dir -name '*.mk' \( ! -path "$root_dir/build*" -prune \) \
|
||||||
\( -exec grep -H '^LOCAL_PACKAGE_NAME ' {} \; \
|
\( -exec grep -H '^LOCAL_PACKAGE_NAME ' {} \; \
|
||||||
-false -o -exec grep -H '^LOCAL_MODULE ' {} \; \) \
|
-false -o -exec grep -H '^LOCAL_MODULE ' {} \; \) \
|
||||||
@@ -55,6 +64,12 @@ mv $dest_file $tmp_file
|
|||||||
grep -v "^$root_dir/vendor/google" $tmp_file > $dest_file
|
grep -v "^$root_dir/vendor/google" $tmp_file > $dest_file
|
||||||
|
|
||||||
rm $tmp_file
|
rm $tmp_file
|
||||||
end=$(($(date +%s%N) / 1000000))
|
|
||||||
|
if [ $darwin == 1 ];
|
||||||
|
then
|
||||||
|
end=$(($(date +%s) / 1000000))
|
||||||
|
else
|
||||||
|
end=$(($(date +%s%N) / 1000000))
|
||||||
|
fi
|
||||||
elapse=$(($end - $start))
|
elapse=$(($end - $start))
|
||||||
echo "Took ${elapse}ms"
|
echo "Took ${elapse}ms"
|
||||||
|
|||||||
Reference in New Issue
Block a user