From 8984cc8a71848c9d6eb7d114481b4643a9e83074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 11:09:25 +0100 Subject: [PATCH] Add script for polarssl symlink creation --- scripts/polarssl_symlinks.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scripts/polarssl_symlinks.sh diff --git a/scripts/polarssl_symlinks.sh b/scripts/polarssl_symlinks.sh new file mode 100755 index 000000000..a14ff3280 --- /dev/null +++ b/scripts/polarssl_symlinks.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# Create libpolarssl.* symlinks in the given directory + +if [ $# -ne 1 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +if [ -d "$1" ]; then :; else + echo "$0: target directory must exist" >&2 + exit 1 +fi + +if cd "$1"; then :; else + echo "$0: cd '$1' failed" >&2 + exit 1 +fi + +if ls | grep 'libmbedtls\.' >/dev/null; then :; else + echo "$0: libmbedtls not found in target directory" >&2 + exit 1 +fi + +for f in libmbedtls.*; do + ln -sf $f libpolarssl${f#libmbedtls} +done