contrib/dockerrpm
author Matt Mackall <mpm@selenic.com>
Thu, 29 May 2014 16:01:39 -0700
changeset 21642 76a347bcdb33
parent 21561 f1bcc33a5c52
child 22438 f5abb231b80a
permissions -rwxr-xr-x
docker: check for docker.io first

#!/bin/bash

BUILDDIR=$(dirname $0)
ROOTDIR=$(cd $BUILDDIR/..; pwd)

if which docker.io >> /dev/null ; then
  DOCKER=docker.io
elif which docker >> /dev/null ; then
  DOCKER=docker
fi

$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/"