about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-09-08 17:28:33 +0100
committerJames Booth <boothj5@gmail.com>2012-09-08 17:28:33 +0100
commit24a604494d0c7f55c918eae418f1ce0da4a2acae (patch)
tree9d8573b4e03ce335a853f912ea5378f38f7fdac5
parent272e12a38b1c0ec35ed1ffc69ecacfd74f173840 (diff)
downloadprofani-tty-24a604494d0c7f55c918eae418f1ce0da4a2acae.tar.gz
Added cygwin to install script
-rwxr-xr-xinstall-all.sh31
1 files changed, 27 insertions, 4 deletions
diff --git a/install-all.sh b/install-all.sh
index fd78abfd..bb79e710 100755
--- a/install-all.sh
+++ b/install-all.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-debian_deps()
+debian_prepare()
 {
     echo
     echo Profanity installer ... updating apt repositories
@@ -14,7 +14,7 @@ debian_deps()
 
 }
 
-fedora_deps()
+fedora_prepare()
 {
     echo
     echo Profanity installer... installing dependencies
@@ -25,6 +25,21 @@ fedora_deps()
     sudo yum -y install gcc gcc-c++ autoconf automake openssl-devel.$ARCH expat-devel.$ARCH ncurses-devel.$ARCH libxml2-devel.$ARCH glib2-devel.$ARCH libnotify-devel.$ARCH libcurl-devel.$ARCH
 }
 
+cygwin_prepare()
+{
+    echo
+    echo Profanity installer... installing dependencies
+    echo
+
+    wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
+    chmod +x apt-cyg
+    mv apt-cyg /usr/local/bin/
+
+    apt-cyg install make gcc automake autoconf pkg-config openssl-devel expat zlib-devel libncurses-devel libncurses-devel libxml2-devel libglib2.0-devel libcurl-devel libidn-devel libssh2-devel libkrb5-devel openldap-devel
+    ln -s /usr/bin/gcc-3.exe /usr/bin/gcc.exe
+    ln -s /usr/bin/g++-3.exe /usr/bin/g++.exe
+}
+
 install_head_unit()
 {
     echo
@@ -46,6 +61,7 @@ install_lib_strophe()
     git clone git://github.com/metajack/libstrophe.git
     cd libstrophe
     ./bootstrap.sh
+    ./bootstrap.sh # second call seems to fix problem on cygwin
     ./configure
     make
     sudo make install
@@ -92,6 +108,11 @@ if [ "${OS}" = "Linux" ]; then
     elif [ -f /etc/debian_version ]; then
         DIST=debian
     fi
+else
+    echo $OS | grep -i cygwin
+    if [ "$?" -eq 0 ]; then
+        DIST=cygwin
+    fi
 fi
 
 case "$DIST" in
@@ -99,9 +120,11 @@ unknown)    echo The install script will not work on this OS.
             echo Try a manual install instead.
             exit
             ;;
-fedora)     fedora_deps
+fedora)     fedora_prepare
+            ;;
+debian)     debian_prepare
             ;;
-debian)     debian_deps
+cygwin)     cygwin_prepare
             ;;
 esac