#!/bin/bash -xe # Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. CODENAME=$1 BASE=/afs/.openstack.org/mirror/debian-openstack BRANCH=$(echo $ZUUL_REFNAME | cut -d/ -f2) K5START="k5start -t -f /etc/packaging.keytab \ service/packaging \ -- timeout -k 2m 5m" # Build up which distribution we are using. Here we will be # converting: # jessie-> jessie-newton # jessie-backports -> jessie-newton-backports IFS='-' read -r -a array <<< $CODENAME DISTRIBUTION="${array[0]}" DISTRIBUTION+=-$BRANCH if ! [ -z "${array[1]}" ]; then DISTRIBUTION+="-${array[1]}" fi cd $BASE/dists/$DISTRIBUTION $K5START gpg --armor --detach-sign --output Release.gpg Release $K5START gpg --armor --clearsign --output InRelease Release date --iso-8601=ns | $K5START tee $BASE/timestamp.txt