Manuel Pégourié-Gonnard | 8984cc8 | 2015-01-28 11:09:25 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Create libpolarssl.* symlinks in the given directory |
| 4 | |
| 5 | if [ $# -ne 1 ]; then |
| 6 | echo "Usage: $0 <target-directory>" >&2 |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | if [ -d "$1" ]; then :; else |
| 11 | echo "$0: target directory must exist" >&2 |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | if cd "$1"; then :; else |
| 16 | echo "$0: cd '$1' failed" >&2 |
| 17 | exit 1 |
| 18 | fi |
| 19 | |
| 20 | if ls | grep 'libmbedtls\.' >/dev/null; then :; else |
| 21 | echo "$0: libmbedtls not found in target directory" >&2 |
| 22 | exit 1 |
| 23 | fi |
| 24 | |
| 25 | for f in libmbedtls.*; do |
| 26 | ln -sf $f libpolarssl${f#libmbedtls} |
| 27 | done |