diff --git a/scripts/polarssl_symlinks.sh b/scripts/polarssl_symlinks.sh new file mode 100755 index 0000000000..a14ff3280b --- /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