Add .sh extension to update_submodules so it gets correct line ending
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 27 Jan 2017 14:18:23 +0000 (15:18 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 27 Jan 2017 14:19:01 +0000 (15:19 +0100)
It'd not be recognized as a shell file so it'd get CRLF line
endings on Windows which doesn't work. Also added a shebang.

Also remove get-cygwin-deps.sh, it is long outdated.
Correct instructions are on the Mono website.

Makefile.am
configure.ac
scripts/Makefile.am
scripts/get-cygwin-deps.sh [deleted file]
scripts/update_submodules [deleted file]
scripts/update_submodules.sh [new file with mode: 0755]

index 02491256486202f42398cd99bc69326202cf6f84..8b34970a14e32997af77cb78cacc611f4da7bf9f 100644 (file)
@@ -19,7 +19,7 @@ all: update_submodules
 
 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
 update_submodules:
-       @$(srcdir)/scripts/update_submodules
+       @$(srcdir)/scripts/update_submodules.sh
 
 .PHONY: update_submodules
 
index fdb6f7554897c75c35c409666e20a9931bbe81ca..b9c7520e38d9a02fcf3652a3760bf5ec86589ee8 100644 (file)
@@ -4443,7 +4443,7 @@ po/Makefile
 ])
 
 # Update all submodules recursively to ensure everything is checked out
-$srcdir/scripts/update_submodules
+$srcdir/scripts/update_submodules.sh
 
 if test x$host_win32 = xyes; then
    # Get rid of 'cyg' prefixes in library names
index 62d350c79dda01e1d30428338ac3aa4066b66e2b..e865d73039126367418da7d9eff4def1de67f50b 100644 (file)
@@ -155,7 +155,7 @@ EXTRA_DIST =                        \
        mono-find-requires.in   \
        peverify.in                     \
        xbuild.in                       \
-       update_submodules               \
+       update_submodules.sh    \
        mcs.in                          \
        csc.in                          \
        dmcs.in                         \
@@ -163,7 +163,6 @@ EXTRA_DIST =                        \
        mono-test-install       \
        mono-heapviz            \
        $(MDOC_COMPAT)          \
-       get-cygwin-deps.sh      \
        mono-configuration-crypto.in    \
        submodules/versions.mk  \
        submodules/versions.py
diff --git a/scripts/get-cygwin-deps.sh b/scripts/get-cygwin-deps.sh
deleted file mode 100755 (executable)
index 6fc456e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-#
-# This script will download and install the dependencies needed for compiling
-# mono on cygwin
-#
-
-# Check for required packages
-
-commands="wget unzip automake autoconf libtool make bison"
-
-failed=0
-for i in $commands; do
-       if ! which $i > /dev/null 2>&1; then 
-               echo "You must have the '$i' package installed."
-               failed=1
-       fi
-done
-
-if [ $failed = 1 ]; then
-       exit 1
-fi
-
-dir=cygwin-deps
-mkdir -p $dir
-
-echo -n "Downloading deps... "
-if [ ! -f $dir/gettext-runtime-0.17-1.zip ]; then
-       wget -P $dir http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip
-fi
-if [ ! -f $dir/libiconv-1.13-mingw32-dev.tar.gz ]; then
-       wget -P $dir http://sourceforge.net/projects/mingw/files/MinGW/libiconv/libiconv-1.13/libiconv-1.13-mingw32-dev.tar.gz/download
-fi
-echo "done."
-
-echo -n "Extracting to cygwin-deps/ ..."
-(cd $dir && for i in *.zip; do unzip -oq $i || exit 1; done) || exit 1
-# This is needed because windows can't use dll's without an x flag.
-chmod a+x $dir/bin/*.dll
-echo "done."
-
-echo -n "Patching PC files... "
-prefix=$PWD/$dir
-find $dir -name "*.pc" > $dir/pc-files
-for i in `cat $dir/pc-files`; do
-       (sed -e "s,^prefix=.*,prefix=$prefix,g" < $i > $i.tmp && mv $i.tmp $i) || exit 1
-done
-rm -f $dir/pc-files
-echo "done."
-
-# Create an environment shell file
-rm -f $dir/env.sh
-echo "export PKG_CONFIG_PATH=\"$PWD/$dir/lib/pkgconfig:\$PKG_CONFIG\"" >> $dir/env.sh
-echo "export PATH=\"$PWD/$dir/bin:\$PATH\"" >> $dir/env.sh
-
-echo "Source $dir/env.sh into your environment using:"
-echo ". $dir/env.sh"
-echo "Then run mono's configure."
diff --git a/scripts/update_submodules b/scripts/update_submodules
deleted file mode 100755 (executable)
index 22109b9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
-SUBMODULE_OK='Git submodules updated successfully'
-if test -d .git; then \
-          (git submodule update --init --recursive && echo $SUBMODULE_OK) \
-       || (git submodule init && git submodule update --recursive && echo $SUBMODULE_OK) \
-       || (git submodule init && git submodule update && echo $SUBMODULE_ERROR) \
-       || (echo 'Git submodules could not be updated. Compilation will fail') \
-fi
-
diff --git a/scripts/update_submodules.sh b/scripts/update_submodules.sh
new file mode 100755 (executable)
index 0000000..83ec6d3
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
+SUBMODULE_OK='Git submodules updated successfully'
+if test -d .git; then \
+          (git submodule update --init --recursive && echo $SUBMODULE_OK) \
+       || (git submodule init && git submodule update --recursive && echo $SUBMODULE_OK) \
+       || (git submodule init && git submodule update && echo $SUBMODULE_ERROR) \
+       || (echo 'Git submodules could not be updated. Compilation will fail') \
+fi
+