Update AppRun.sh

[ci skip]
This commit is contained in:
darealshinji 2018-03-03 20:05:38 +01:00 committed by GitHub
parent 3b8e82101d
commit a2866fd043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,8 @@
#!/bin/sh -e
# A shell script that does the same as the binaries in the release section.
# It's only here as an example on how to achieve it with a Shell script.
cd "$(dirname "$0")"
cxxpre=""
@ -15,7 +18,7 @@ fi
cd "usr"
if [ -e "./optional/libstdc++/libstdc++.so.6" ]; then
lib="$(ldconfig -p | grep "libstdc++\.so\.6 ($libc6arch)" | awk 'NR==1{print $NF}')"
lib="$(PATH="/sbin:$PATH" ldconfig -p | grep "libstdc++\.so\.6 ($libc6arch)" | awk 'NR==1{print $NF}')"
sym_sys=$(tr '\0' '\n' < "$lib" | grep -e '^GLIBCXX_3\.4' | tail -n1)
sym_app=$(tr '\0' '\n' < "./optional/libstdc++/libstdc++.so.6" | grep -e '^GLIBCXX_3\.4' | tail -n1)
if [ "$(printf "${sym_sys}\n${sym_app}"| sort -V | tail -1)" != "$sym_sys" ]; then
@ -24,7 +27,7 @@ if [ -e "./optional/libstdc++/libstdc++.so.6" ]; then
fi
if [ -e "./optional/libgcc/libgcc_s.so.1" ]; then
lib="$(ldconfig -p | grep "libgcc_s\.so\.1 ($libc6arch)" | awk 'NR==1{print $NF}')"
lib="$(PATH="/sbin:$PATH" ldconfig -p | grep "libgcc_s\.so\.1 ($libc6arch)" | awk 'NR==1{print $NF}')"
sym_sys=$(tr '\0' '\n' < "$lib" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1)
sym_app=$(tr '\0' '\n' < "./optional/libgcc/libgcc_s.so.1" | grep -e '^GCC_[0-9]\\.[0-9]' | tail -n1)
if [ "$(printf "${sym_sys}\n${sym_app}"| sort -V | tail -1)" != "$sym_sys" ]; then