Mercurial > minori
comparison scripts/win32/deploy_build.sh @ 257:699a20c57dc8
scripts: Bourne shell compatibility
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Sun, 18 Feb 2024 16:02:14 -0500 |
| parents | 3a4aa9b4814c |
| children | b2a4358da16c |
comparison
equal
deleted
inserted
replaced
| 256:6f3d193cb4b7 | 257:699a20c57dc8 |
|---|---|
| 8 DIR="${DIR:-minori}" | 8 DIR="${DIR:-minori}" |
| 9 | 9 |
| 10 GetNeededLibraries() { | 10 GetNeededLibraries() { |
| 11 # do not run this on untrusted executables. | 11 # do not run this on untrusted executables. |
| 12 # see: ldd(1) | 12 # see: ldd(1) |
| 13 system="$(echo "$MSYSTEM" | tr "[:upper:]" "[:lower:]")" | |
| 13 ldd "$1" | while IFS="" read -r dependency; do | 14 ldd "$1" | while IFS="" read -r dependency; do |
| 14 lib="$(cut -d' ' -f3 <<< $dependency)" | 15 lib="$(printf -- "$dependency" | cut -d' ' -f3)" |
| 15 if [[ "$lib" == /"${MSYSTEM,,}"/* ]]; then | 16 case $lib in |
| 16 echo "$lib" | 17 "/$system/"*) |
| 17 fi | 18 printf -- "$lib\n" |
| 19 ;; | |
| 20 *) | |
| 21 ;; | |
| 22 esac | |
| 18 done | 23 done |
| 19 } | 24 } |
| 20 | 25 |
| 21 | 26 |
| 22 if [ -d "$DIR" ]; then | 27 if [ -d "$DIR" ]; then |
