Skip to content

Commit

Permalink
Allow overwriting of results.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcj committed May 26, 2014
1 parent 91a3b54 commit 0f287eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/dc
Expand Up @@ -123,15 +123,16 @@ case "$1" in
module="$2"
name="$3"
staging="${4:-$CPANCOVER_STAGING}"
mkdir -p $staging
staging_tmp="$staging"_tmp
mkdir -p $staging $staging_tmp
# echo $name
container=$(docker.io run -d -v=/home/pjcj/g/perl/Devel--Cover:/dc:ro \
-w=/dc --rm=false --name="$name" \
pjcj/cpancover dc cpancover-build-module $module)
# https://github.com/dotcloud/docker/issues/3986
docker.io wait "$name"
docker.io logs "$name"
local_staging="$staging/$name"
local_staging="$staging_tmp/$name"
sudo docker.io cp "$name:/staging" "$local_staging"
if [ -d "$local_staging" ]; then
sudo chmod -R 755 "$local_staging"
Expand All @@ -141,6 +142,7 @@ case "$1" in
mv "$local_staging"/staging/* "$staging"
rm -r "$local_staging"
fi
rm -rf $staging_tmp
docker.io rm "$name"
;;
"cpancover-generate-html")
Expand Down

0 comments on commit 0f287eb

Please sign in to comment.