Files
agnos-builder/tools/extract_tools.sh
Adeeb Shihadeh 0a44f0683f gc pass (#581)
* rm unused .gitattributes

* rm more unused

* lil more
2026-05-03 15:05:34 -07:00

35 lines
748 B
Bash
Executable File

#!/usr/bin/env bash
set -e
git lfs &> /dev/null || {
echo "ERROR: git lfs not installed"
exit 1
}
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
THIS_SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
ROOT=$DIR/..
cd $DIR
# grep for `-`, which stands for LFS pointer
git lfs ls-files | awk '{print $2}' | grep "-" &>/dev/null && {
echo "Pulling git lfs objects..."
cd $ROOT
git lfs install
git lfs pull
cd $DIR
}
LINARO_GCC=aarch64-linux-gnu-gcc
LINARO_GCC_TARBALL=$LINARO_GCC.tar.gz
ARCH=$(uname -m)
if [ "$ARCH" != "arm64" ] && [ "$ARCH" != "aarch64" ]; then
echo "Extracting tools..."
if [ ! -d $LINARO_GCC ]; then
tar -xzf $LINARO_GCC_TARBALL &>/dev/null
fi
fi