diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-05 12:36:46 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-05 12:36:46 +0000 |
commit | b8cf5951e3191bbc8ad3118aa7d175eb1f603d66 (patch) | |
tree | a6b96c33cf9ca81b3db52cff1124bde4a3f11299 /armv7-versatile/download-image.sh | |
parent | 8b3eacda6249db97e8cbe0d1930eae14acc44270 (diff) | |
download | genivi-initial-setup-b8cf5951e3191bbc8ad3118aa7d175eb1f603d66.tar.gz |
Add ARMv7 scripts, reorganise directories
Diffstat (limited to 'armv7-versatile/download-image.sh')
-rwxr-xr-x | armv7-versatile/download-image.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/armv7-versatile/download-image.sh b/armv7-versatile/download-image.sh new file mode 100755 index 0000000..f283783 --- /dev/null +++ b/armv7-versatile/download-image.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -e + +DIR="$1" + +if [[ -z "$DIR" ]]; then + echo "Usage: $0 <INSTALL DIR>" + exit 1 +fi + +COMPRESSED_IMAGE="devel-system-armv7-versatile.img.gz" +DECOMPRESSED_IMAGE=${COMPRESSED_IMAGE/.gz/} +KERNEL_IMAGE="devel-system-armv7-versatile.zimage" + +if [[ ! -d "$DIR" ]]; then + mkdir -p "$DIR" +fi + +cd "$DIR" + +if [[ ! -f "$COMPRESSED_IMAGE" ]]; then + echo "Downloading development image..." + curl "http://download.baserock.org/baserock/$COMPRESSED_IMAGE" > \ + "$COMPRESSED_IMAGE" +fi + +if [[ -f "$KERNEL_IMAGE" ]]; then + echo "Downloading kernel image..." + curl "http://download.baserock.org/baserock/$KERNEL_IMAGE" > \ + "$KERNEL_IMAGE" +fi + +if [[ ! -f "$DECOMPRESSED_IMAGE" ]]; then + echo "Decompressing development image..." + gzip -cd "$COMPRESSED_IMAGE" > "$DECOMPRESSED_IMAGE" +fi |