[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] Add a script to allow remote triggering of copy-installer



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

  • 1af0bbf7
    by Joerg Jaspert at 2023-04-10T23:08:41+02:00
    Add a script to allow remote triggering of copy-installer
    

1 changed file:

Changes:

  • scripts/debian/copy_installer
    1
    +#!/bin/bash
    
    2
    +
    
    3
    +# Copyright (C) 2008,2010,2023 Joerg Jaspert <joerg@debian.org>
    
    4
    +
    
    5
    +# Permission is hereby granted, free of charge, to any person obtaining
    
    6
    +# a copy of this software and associated documentation files (the
    
    7
    +# "Software"), to deal in the Software without restriction, including
    
    8
    +# without limitation the rights to use, copy, modify, merge, publish,
    
    9
    +# distribute, sublicense, and/or sell copies of the Software, and to
    
    10
    +# permit persons to whom the Software is furnished to do so, subject to
    
    11
    +# the following conditions:
    
    12
    +#
    
    13
    +# The above copyright notice and this permission notice shall be
    
    14
    +# included in all copies or substantial portions of the Software.
    
    15
    +#
    
    16
    +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    
    17
    +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    
    18
    +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    
    19
    +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
    
    20
    +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    
    21
    +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
    
    22
    +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    
    23
    +
    
    24
    +
    
    25
    +set -e
    
    26
    +set -u
    
    27
    +
    
    28
    +# Load up some standard variables
    
    29
    +export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
    
    30
    +. $SCRIPTVARS
    
    31
    +
    
    32
    +INPUT=(${SSH_ORIGINAL_COMMAND})
    
    33
    +VERSION="${INPUT[0]}"
    
    34
    +SOURCE="${INPUT[1]:-"unstable"}"
    
    35
    +DEST="${INPUT[2]:-"testing"}"
    
    36
    +SOURCE=${SOURCE,,}
    
    37
    +DEST=${DEST,,}
    
    38
    +
    
    39
    +# Change to a known safe location
    
    40
    +cd ${masterdir}
    
    41
    +
    
    42
    +if [[ -d ${ftpdir}/dists/${SOURCE}/main/installer-amd64/${VERSION} ]]; then
    
    43
    +    echo "Copying installer version ${VERSION} from ${SOURCE} to ${DEST}"
    
    44
    +    dak copy-installer ${VERSION}
    
    45
    +else
    
    46
    +    echo "Couldn't see installer version ${VERSION} in ${SOURCE}s dir, not doing anything"
    
    47
    +    exit 1
    
    48
    +fi
    
    49
    +
    
    50
    +echo "Done"
    
    51
    +
    
    52
    +exit 0


  • Reply to: