-
-
Save chihchun/2970c74d3280cbe8207e32e571da5b98 to your computer and use it in GitHub Desktop.
script to create ubuntu rootfs overlay for silos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ] ; then echo "$0: silo_number [release] [team] [arch]" && exit 1 ; fi | |
SILO=$1 | |
RELEASE=${2:-"vivid"} | |
TEAM=${3:-"ci-train-ppa-service"} | |
ARCH=${4:-"armhf"} | |
PACKAGES_URL="http://ppa.launchpad.net/${TEAM}/landing-${SILO}/ubuntu/dists/${RELEASE}/main/binary-${ARCH}/Packages.gz" | |
PACKAGES=$(curl -s ${PACKAGES_URL} | gzip -cd | grep ^Package: | grep -v -- -dev\$ | cut -d: -f2) | |
if [ -z "$PACKAGES" ] ; then echo "http://ppa.launchpad.net/${TEAM}/landing-${SILO}/ubuntu/dists/${RELEASE}/main/binary-${ARCH}/Packages.gz" "package found not\n" ; exit 2 ; fi | |
set -e | |
if [ ! -d overlay ] ; then mkdir overlay ; fi | |
for PACKAGE in ${PACKAGES} ; do | |
build/tools/pull-lp-bin.py -a ${ARCH} -t ${TEAM} -p landing-${SILO} ${PACKAGE} ${RELEASE} -o overlay | |
done | |
for d in overlay/*.deb ; do | |
dpkg-deb -x $d overlay | |
done | |
rm -rf overlay/*.deb overlay/usr/share/doc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment