Mercurial > hg > vamp-plugin-pack
diff deploy/linux/sign-plugins @ 37:28b1dd4ee370
Try separating out platform script subdirs
author | Chris Cannam |
---|---|
date | Mon, 16 Dec 2019 14:37:00 +0000 |
parents | deploy/sign-plugins@375d2a839053 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/sign-plugins Mon Dec 16 14:37:00 2019 +0000 @@ -0,0 +1,52 @@ +#!/bin/bash + +# This is purely a stub - we have no actual signing on Linux yet + +set -e + +usage() { + echo "Usage: $0 <plugin> [<plugin> ...]" 1>&2 + echo " $0 <plugin-dir>" 1>&2 + exit 2 +} + +first_arg="$1" + +if [ -z "$first_arg" ]; then + usage +fi + +if [ -d "$first_arg" ] && [ -n "$2" ]; then + usage +fi + +paths=("$@") + +set -u + +sign() { + path="$1" + echo "$path" +} + +if [ -d "$first_arg" ]; then + for path in "$first_arg"/*.{dll,so,dylib} ; do + if [ -f "$path" ]; then + sign "$path" + fi + done + touch "$first_arg/.signed" +else + for path in "${paths[@]}"; do + if [ ! -f "$path" ]; then + echo "ERROR: Path $path not found" 1>&2 + exit 1 + fi + done + for path in "${paths[@]}"; do + sign "$path" + done +fi + +exit 0 +