Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Android/development/development/tools/idegen/   (Android Betriebssystem Version 17©)  Datei vom 26.5.2026 mit Größe 2 kB image not shown  

Quelle  index-gen.sh

  Sprache: Shell
 

#!/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

echo "Generating index file $dest_file..."

[[ "$(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 \) \
  \( -exec grep -H '^LOCAL_PACKAGE_NAME ' {} \; \
  -false -o -exec grep -H '^LOCAL_MODULE ' {} \; \) \
  > $tmp_file
sed -e 's/LOCAL_PACKAGE_NAME *:= *//g' -e 's/LOCAL_MODULE *:= *//g' -e 's/\^M*$//g' < $tmp_file > $dest_file

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
C=76 H=100 G=88

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.