Files
react-native/scripts/circleci/apt-get-android-deps.sh
T
Andres SuarezandFacebook GitHub Bot 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00

30 lines
1006 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
echo "Downloading package lists..."
sudo apt-get update -y
if ! [[ -d ~/vendor/apt ]]; then
mkdir -p ~/vendor/apt
fi
# First check for archives cache
if ! [[ -d ~/vendor/apt/archives ]]; then
# It doesn't so download the packages
echo "Downloading build dependencies..."
sudo apt-get install --download-only ant autoconf automake g++ gcc libqt5widgets5 lib32z1 lib32stdc++6 make maven python-dev python3-dev qml-module-qtquick-controls qtdeclarative5-dev libpulse0 file -y
# Then move them to our cache directory
sudo cp -R /var/cache/apt ~/vendor/
# Making sure our user has ownership, in order to cache
sudo chown -R ${USER:=$(/usr/bin/id -run)}:$USER ~/vendor/apt
fi
# Install all packages in the cache
echo "Installing build dependencies..."
sudo dpkg -i ~/vendor/apt/archives/*.deb