diff options
author | rubo77 <github@r.z11.de> | 2018-07-03 08:21:30 +0200 |
---|---|---|
committer | rubo77 <github@r.z11.de> | 2018-07-03 08:35:15 +0200 |
commit | 1e5177ba89b0b5429098d5b923a5918711a638c3 (patch) | |
tree | 829d018fc11aba89e44e64dea3c951e9bbf80a9e | |
parent | b99b6cd2549245571ed09854b2ae6e93cd7f5a77 (diff) |
umbenannt: build.sh -> gitlab-ci/build.sh
umbenannt: update-git.sh -> gitlab-ci/update-git.sh
gelöscht: sign.sh
-rwxr-xr-x | gitlab-ci/build.sh (renamed from build.sh) | 0 | ||||
-rwxr-xr-x | gitlab-ci/update-git.sh (renamed from update-git.sh) | 0 | ||||
-rwxr-xr-x | sign.sh | 87 |
3 files changed, 0 insertions, 87 deletions
diff --git a/build.sh b/gitlab-ci/build.sh index df57deb..df57deb 100755 --- a/build.sh +++ b/gitlab-ci/build.sh diff --git a/update-git.sh b/gitlab-ci/update-git.sh index 762fd79..762fd79 100755 --- a/update-git.sh +++ b/gitlab-ci/update-git.sh diff --git a/sign.sh b/sign.sh deleted file mode 100755 index 919dd4e..0000000 --- a/sign.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -e -# ===================================================================== -# Downloads, signs and uploads a gluon manifest file. -# -# This is used by firmware developers to sign a release after it was -# uploaded by the build system. -# -# Source: https://github.com/freifunk-fulda -# Contact: fffd-noc@lists.open-mail.net -# Web: https://fulda.freifunk.net -# ===================================================================== - -# Basic configuration -SRV_USER="root" -SRV_HOST="firmware.fulda.freifunk.net" -SRV_PORT=22022 -SRV_PATH="/var/www/downloads.fulda.freifunk.net/firmware" - -# Help function used in error messages and -h option -usage() { - echo "" - echo "Downloads, signs and uploads a gluon manifest file." - echo "Usage ./sign.sh KEYPATH BRANCH" - echo " KEYPATH the path to the developers private key" - echo " BRANCH the branch to sign" -} - -# Evaluate arguments for build script. -if [[ "${#}" != 2 ]]; then - echo "Insufficient arguments given" - usage - exit 1 -fi - -KEYPATH="${1}" -BRANCH="${2}" - -# Subsitute all slashes in the branch name -BRANCH=${BRANCH//\//-} - -# Sanity checks for required arguments -if [[ ! -e "${KEYPATH}" ]]; then - echo "Error: Key file not found or not readable: ${KEY_PATH}" - usage - exit 1 -fi - -# Check if ecdsa utils are installed -if ! which ecdsasign 2> /dev/null; then - echo "ecdsa utils are not found." - exit 1 -fi - -# Determine temporary local file -TMP="$(mktemp)" - -# Determine upload target prefix -case "${BRANCH}" in - stable| \ - testing| \ - development) - TARGET="${BRANCH}" - ;; - - *) - TARGET="others/${BRANCH}" - ;; -esac - -# Download manifest -scp \ - -o stricthostkeychecking=no \ - -P "${SRV_PORT}" \ - "${SRV_USER}@${SRV_HOST}:${SRV_PATH}/${TARGET}/current/sysupgrade/${BRANCH}.manifest" \ - "${TMP}" - -# Sign the local file -./gluon/contrib/sign.sh \ - "${KEYPATH}" \ - "${TMP}" - -# Upload signed file -scp \ - -o stricthostkeychecking=no \ - -P "${SRV_PORT}" \ - "${TMP}" \ - "${SRV_USER}@${SRV_HOST}:${SRV_PATH}/${TARGET}/current/sysupgrade/${BRANCH}.manifest" |