reference: 
https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script/57660444#57660444
---
 scilab/modules/dynamic_link/src/scripts/compilerDetection.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh 
b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
index ead86eb58ac..bf31f3a1a6c 100755
--- a/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
+++ b/scilab/modules/dynamic_link/src/scripts/compilerDetection.sh
@@ -1,7 +1,6 @@
 #!/bin/sh

-PROGNAME="$0"
-PATHTOCONFIGURE=`dirname "$PROGNAME"`
+PATHTOCONFIGURE=${BASH_SOURCE[0]%/*}/
 cd $PATHTOCONFIGURE
 if test -x "$(which gcc 2>/dev/null)"; then
     # Detect the actual path to the libstdc++ library. For the dynamic link
--
2.41.0

_______________________________________________
dev mailing list
dev@lists.scilab.org
https://lists.scilab.org/mailman/listinfo/dev
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

Reply via email to