From a2866fd04352946a9d6800e98a0ad321e2177072 Mon Sep 17 00:00:00 2001 From: darealshinji Date: Sat, 3 Mar 2018 20:05:38 +0100 Subject: [PATCH] Update AppRun.sh [ci skip] --- AppRun.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AppRun.sh b/AppRun.sh index 67978b9..52e922c 100755 --- a/AppRun.sh +++ b/AppRun.sh @@ -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