blob: a0d7f1553ccc7584ef76425ed763dd7aef7ec07c [file] [log] [blame]
Nicolas De Loof58826312014-11-28 10:52:05 +01001#!/bin/bash
2set -e
3
4versions=( "$@" )
5if [ ${#versions[@]} -eq 0 ]; then
6 versions=( */ )
7fi
8versions=( "${versions[@]%/}" )
9
10for version in "${versions[@]}"; do
11 rm -rf "$version"/*
12 cp Dockerfile.template jenkins.sh plugins.sh init.groovy "$version/"
13 mv "$version/Dockerfile.template" "$version/Dockerfile"
14 sed -i "" 's/%%JENKINS_VERSION%%/'$version'/g; s/%%JENKINS_VERSION%%/'$version'/g' "$version/Dockerfile"
15done
16