forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache apt dependencies in test_android
Summary: Closes facebook#18576 Differential Revision: D7415216 Pulled By: hramos fbshipit-source-id: 9b7199fe5fb91a26ba0881e426a85395b2923f26
- Loading branch information
Showing
2 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
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 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 |