#!/bin/bash # # Copyright (C) 2012 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Generates a module index file by searching through android source # tree for make files. The intellij-gen.sh script automatically calls # this script the first time or if you delete the generated indexed # file. The only time you need to run this manually is if modules are # added or deleted. # # To use, run the following command from either your repo root or # development/tools/idegen: # index-gen.sh # # Only tested on linux. Should work for macs but have not tried. #
set -e
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #root_dir=`readlink -f -n $script_dir/../../..`
root_dir=$PWD if [ ! -e $root_dir/.repo ]; then
root_dir=$PWD/../../.. if [ ! -e $root_dir/.repo ]; then echo"Repo root not found. Run this script from your repo root or the idegen directory."
exit 1 fi fi
tmp_file=${root_dir}/tmp.txt
dest_file=${root_dir}/module-index.txt
mv $dest_file $tmp_file # Exclude specific directories from index here. # TODO: make excludes more generic and configurable
grep -v "^$root_dir/vendor/google" $tmp_file > $dest_file
rm $tmp_file
if [ $darwin == 1 ]; then end=$(($(date +%s) / 1000000)) else end=$(($(date +%s%N) / 1000000)) fi
elapse=$(($end - $start)) echo"Took ${elapse}ms"
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.