Bump to lua-5.3.6-4
[git/cygwin-packages/lua.git] / winsymlinks-nativestrict.sh
1 ################################################################
2 # __check_cygwin_env ():
3 # a function to extract the last setting of a specified
4 # option in CYGWIN variable.
5 #
6 # Usage: __check_cygwin_env option_name
7 #
8 # cf. The Cygwin User's Guide: The CYGWIN environment variable [1].
9 # [1]: https://cygwin.com/cygwin-ug-net/using-cygwinenv.html
10 #
11 __check_cygwin_env () {
12 X_R=''
13 X_C=`printf "%s" "$1" | sed -e 's/^no//'` # Remove a prefix 'no'
14 for X_OPT in ${CYGWIN}; do
15 X_T="${X_OPT}"
16 X_T=`printf "%s" "${X_T}" | sed -e 's/^no//'` # Remove a prefix 'no'
17 X_T=`printf "%s" "${X_T}" | sed -e 's/:.*$//'` # Remove optional parameters
18 if [ x"${X_T}" = x"${X_C}" ]; then
19 X_R="${X_OPT}"
20 fi
21 done
22 printf "%s" "${X_R}"
23 }
24
25 ################################################################
26 # A workaround when CYGWIN variable has 'winsymlinks:nativestrict'
27 #
28 if [ x"winsymlinks:nativestrict" = x"`__check_cygwin_env winsymlinks`" ]; then
29 echo "$0: *** WARNING ***"
30 echo " CYGWIN variable has 'winsymlinks:nativestrict'..."
31 echo " We are overriding it by 'winsymlinks:native' in this script"
32 export CYGWIN="${CYGWIN} winsymlinks:native"
33 fi
34
35 ################################################################
This page took 0.055181 seconds and 6 git commands to generate.