elixir/utils/index-all-repositories
Michael Opdenacker bc4be252df utils/index-all-repositories: add freebsd
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2024-01-11 09:56:08 +01:00

96 lines
3.4 KiB
Bash
Executable file

#!/bin/bash
# Runs indexing from scratch on all supported projects
# Needed when full re-indexing is needed:
# - to fix an indexing bug
# - after database changes
# This file is part of Elixir, a source code cross-referencer.
#
# Copyright (C) 2019--2020 Michael Opdenacker and contributors
#
# Elixir is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Elixir is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Elixir. If not, see <http://www.gnu.org/licenses/>.
index() {
project=$1
master=$2
remote=$3
remote2=$4
echo "$project: first indexing pass..."
export LXR_DATA_DIR=$ELIXIR_ROOT/$project/data
export LXR_REPO_DIR=$ELIXIR_ROOT/$project/repo
mkdir -p $LXR_DATA_DIR
git clone --bare $master $LXR_REPO_DIR
if [ "$remote" != "" ]
then
cd $LXR_REPO_DIR
git remote add other $remote
git fetch --tags other
fi
if [ "$remote2" != "" ]
then
cd $LXR_REPO_DIR
git remote add other2 $remote2
git fetch --tags other2
fi
cd $ELIXIR_INSTALL
./update.py $ELIXIR_THREADS
# The above can take so much time on the first run that it's worth running a new update
echo "$project: updating the repository after the first indexing pass..."
cd $LXR_REPO_DIR
git fetch --all --tags
echo "$project: 2nd indexing pass..."
cd $ELIXIR_INSTALL
./update.py $ELIXIR_THREADS
}
export ELIXIR_INSTALL=$(dirname $(dirname $(readlink -f "$0")))
. $ELIXIR_INSTALL/utils/common.sh
if [ "$ELIXIR_ROOT" = "" ]
then
echo "Error: ELIXIR_ROOT environment variable not set"
echo "It's where Elixir data are stored"
exit 1
fi
index amazon-freertos https://github.com/aws/amazon-freertos.git
index arm-trusted-firmware https://github.com/ARM-software/arm-trusted-firmware
index barebox https://git.pengutronix.de/git/barebox
index busybox https://git.busybox.net/busybox
index coreboot https://review.coreboot.org/coreboot.git
index dpdk https://dpdk.org/git/dpdk https://dpdk.org/git/dpdk-stable
index glibc https://sourceware.org/git/glibc.git
index llvm https://github.com/llvm/llvm-project.git
index mesa https://gitlab.freedesktop.org/mesa/mesa.git
index musl https://git.musl-libc.org/git/musl
index ofono https://git.kernel.org/pub/scm/network/ofono/ofono.git
index op-tee https://github.com/OP-TEE/optee_os.git
index qemu https://gitlab.com/qemu-project/qemu.git
index u-boot https://source.denx.de/u-boot/u-boot.git
index uclibc-ng https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git
index zephyr https://github.com/zephyrproject-rtos/zephyr
index toybox https://github.com/landley/toybox.git
index grub https://git.savannah.gnu.org/git/grub.git
index bluez https://git.kernel.org/pub/scm/bluetooth/bluez.git
index linux https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git https://github.com/bootlin/linux-history.git
index xen https://xenbits.xen.org/git-http/xen.git
index freebsd https://git.freebsd.org/src.git