My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/mobile/androidenv/fetchrepo.sh

26 lines
589 B

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl
die() {
echo "$1" >&2
exit 1
}
fetch() {
local url="https://dl.google.com/android/repository/$1"
echo "$url -> $2"
curl -s "$url" -o "$2" || die "Failed to fetch $url"
}
pushd "$(dirname "$0")" &>/dev/null || exit 1
mkdir -p xml
fetch repository2-1.xml xml/repository2-1.xml
for img in android android-tv android-wear android-wear-cn android-automotive google_apis google_apis_playstore
do
fetch sys-img/$img/sys-img2-1.xml xml/$img-sys-img2-1.xml
done
fetch addon2-1.xml xml/addon2-1.xml
popd &>/dev/null