annotate deploy/linux/sign-plugins @ 38:3466e0d1393c

Generate the qrc file
author Chris Cannam
date Tue, 17 Dec 2019 09:51:32 +0000
parents 28b1dd4ee370
children
rev   line source
Chris@30 1 #!/bin/bash
Chris@30 2
Chris@37 3 # This is purely a stub - we have no actual signing on Linux yet
Chris@37 4
Chris@30 5 set -e
Chris@30 6
Chris@31 7 usage() {
Chris@30 8 echo "Usage: $0 <plugin> [<plugin> ...]" 1>&2
Chris@31 9 echo " $0 <plugin-dir>" 1>&2
Chris@30 10 exit 2
Chris@31 11 }
Chris@31 12
Chris@31 13 first_arg="$1"
Chris@31 14
Chris@31 15 if [ -z "$first_arg" ]; then
Chris@31 16 usage
Chris@31 17 fi
Chris@31 18
Chris@31 19 if [ -d "$first_arg" ] && [ -n "$2" ]; then
Chris@31 20 usage
Chris@30 21 fi
Chris@30 22
Chris@30 23 paths=("$@")
Chris@30 24
Chris@30 25 set -u
Chris@30 26
Chris@31 27 sign() {
Chris@31 28 path="$1"
Chris@37 29 echo "$path"
Chris@31 30 }
Chris@30 31
Chris@31 32 if [ -d "$first_arg" ]; then
Chris@31 33 for path in "$first_arg"/*.{dll,so,dylib} ; do
Chris@31 34 if [ -f "$path" ]; then
Chris@31 35 sign "$path"
Chris@31 36 fi
Chris@31 37 done
Chris@31 38 touch "$first_arg/.signed"
Chris@31 39 else
Chris@31 40 for path in "${paths[@]}"; do
Chris@31 41 if [ ! -f "$path" ]; then
Chris@31 42 echo "ERROR: Path $path not found" 1>&2
Chris@31 43 exit 1
Chris@31 44 fi
Chris@31 45 done
Chris@31 46 for path in "${paths[@]}"; do
Chris@31 47 sign "$path"
Chris@31 48 done
Chris@31 49 fi
Chris@30 50
Chris@30 51 exit 0
Chris@30 52