contrib/dockerrpm
author Matt Mackall <mpm@selenic.com>
Tue, 27 May 2014 12:09:34 -0700
changeset 21561 f1bcc33a5c52
parent 21255 62a2749895e4
child 21642 76a347bcdb33
permissions -rwxr-xr-x
docker: update package target to packages/

#!/bin/bash

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

if which docker >> /dev/null ; then
  DOCKER=docker
elif which docker.io >> /dev/null ; then
  DOCKER=docker.io
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/"