summaryrefslogtreecommitdiff
path: root/dev/build/windows/configure_profile.sh
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <gareuselesinge@debian.org>2016-12-27 16:53:30 +0100
committerGravatar Enrico Tassi <gareuselesinge@debian.org>2016-12-27 16:53:30 +0100
commita4c7f8bd98be2a200489325ff7c5061cf80ab4f3 (patch)
tree26dd9c4aa142597ee09c887ef161d5f0fa5077b6 /dev/build/windows/configure_profile.sh
parent164c6861860e6b52818c031f901ffeff91fca16a (diff)
Imported Upstream version 8.6upstream/8.6
Diffstat (limited to 'dev/build/windows/configure_profile.sh')
-rw-r--r--dev/build/windows/configure_profile.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev/build/windows/configure_profile.sh b/dev/build/windows/configure_profile.sh
new file mode 100644
index 00000000..09a9cf35
--- /dev/null
+++ b/dev/build/windows/configure_profile.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+rcfile=~/.bash_profile
+donefile=~/.bash_profile.upated
+
+if [ ! -f $donefile ] ; then
+
+ echo >> $rcfile
+
+ if [ -n "$1" ]; then
+ echo export http_proxy="http://$1" >> $rcfile
+ echo export https_proxy="http://$1" >> $rcfile
+ echo export ftp_proxy="http://$1" >> $rcfile
+ fi
+
+ mkdir -p $RESULT_INSTALLDIR_CFMT/bin
+
+ # A tightly controlled path helps to avoid issues
+ # Note: the order is important: first have the cygwin binaries, then the mingw binaries in the path!
+ # Note: /bin is mounted at /usr/bin and /lib at /usr/lib and it is common to use /usr/bin in PATH
+ # See cat /proc/mounts
+ echo "export PATH=/usr/local/bin:/usr/bin:$RESULT_INSTALLDIR_CFMT/bin:/usr/$TARGET_ARCH/sys-root/mingw/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows" >> $rcfile
+
+ # find and xargs complain if the environment is larger than (I think) 8k.
+ # ORIGINAL_PATH (set by cygwin) can be a few k and exceed the limit
+ echo unset ORIGINAL_PATH >> $rcfile
+
+ # Other installations of OCaml will mess up things
+ echo unset OCAMLLIB >> $rcfile
+
+ touch $donefile
+fi \ No newline at end of file