提交 c5f6776f 编写于 作者: S Simon Fels 提交者: GitHub

Merge pull request #328 from morphis/f/download-arch-image

Add support to download architecture specific image
...@@ -25,13 +25,36 @@ apps: ...@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册