Merge pull request #328 from morphis/f/download-arch-image
Add support to download architecture specific image
This commit is contained in:
commit
c5f6776fa2
1 changed files with 25 additions and 2 deletions
|
|
@ -25,13 +25,36 @@ apps:
|
||||||
parts:
|
parts:
|
||||||
android-images:
|
android-images:
|
||||||
plugin: dump
|
plugin: dump
|
||||||
|
# This needs to be any directory but not the root one as if we use
|
||||||
|
# it we get superious permissions errors with the copied .git tree
|
||||||
|
source: data
|
||||||
build-packages:
|
build-packages:
|
||||||
- wget
|
- wget
|
||||||
install: |
|
install: |
|
||||||
|
IMAGE_PATH=
|
||||||
|
IMAGE_NAME=
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
|
case "$ARCH" in
|
||||||
|
x86_64)
|
||||||
|
IMAGE_PATH="2017/04/12"
|
||||||
|
IMAGE_NAME="android_1_amd64"
|
||||||
|
;;
|
||||||
|
arm*)
|
||||||
|
IMAGE_PATH="2017/06/12"
|
||||||
|
IMAGE_NAME="android_1_armhf"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$IMAGE_PATH" ] || [ -z "$IMAGE_NAME" ]; then
|
||||||
|
echo "ERROR: Unknown architecture $ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# FIXME: downloading with a source: field doesn't work as snapcraft
|
# FIXME: downloading with a source: field doesn't work as snapcraft
|
||||||
# expects the downloaded file to be an archive it can extract.
|
# expects the downloaded file to be an archive it can extract.
|
||||||
wget http://build.anbox.io/android-images/2017/04/12/android_1_amd64.img
|
wget http://build.anbox.io/android-images/$IMAGE_PATH/$IMAGE_NAME.img
|
||||||
mv android_1_amd64.img $SNAPCRAFT_PART_INSTALL/android.img
|
mv $IMAGE_NAME.img $SNAPCRAFT_PART_INSTALL/android.img
|
||||||
prime:
|
prime:
|
||||||
- android.img
|
- android.img
|
||||||
anbox-common:
|
anbox-common:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue