Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Add diff.sh and status.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed Dec 15, 2014
1 parent 2b01015 commit cc8a255
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
23 changes: 23 additions & 0 deletions diff.sh
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

cd "$(dirname "$BASH_SOURCE")"

versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versions=( "${versions[@]%/}" )

arch="$(dpkg --print-architecture)"
for v in "${versions[@]}"; do
(
cd "$v"
thisTarBase="ubuntu-$v-core-cloudimg-$arch"
baseUrl="https://partner-images.canonical.com/core/$v/current"
echo
wget -qO- "$baseUrl/unpacked/build-info.txt" | git --no-pager diff --no-index -- "build-info.txt" - || true
wget -qO- "$baseUrl/$thisTarBase.manifest" | git --no-pager diff --no-index -- "$thisTarBase.manifest" - || true
echo
)
done
21 changes: 21 additions & 0 deletions status.sh
@@ -0,0 +1,21 @@
#!/bin/bash
set -e

cd "$(dirname "$BASH_SOURCE")"

versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versions=( "${versions[@]%/}" )

arch="$(dpkg --print-architecture)"
for v in "${versions[@]}"; do
(
cd "$v"
#thisTarBase="ubuntu-$v-core-cloudimg-$arch"
#baseUrl="https://partner-images.canonical.com/core/$v/current"
serial="$(awk -F '=' '$1 == "SERIAL" { print $2 }' build-info.txt)"
echo '- `ubuntu:'"$v"'`: '"$serial"
)
done

0 comments on commit cc8a255

Please sign in to comment.