about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLennart Bentz <halfur@halfur.de>2015-10-06 20:00:05 +0200
committerLennart Bentz <halfur@halfur.de>2015-10-06 20:00:05 +0200
commitee8ec99e0fb5f8852d4ea8445ac4e26f043dc56b (patch)
treea306d652640be73d8986a942db2b6dfbafc6552b
parent09cd28818665b12ccb0800009a82c4df5f272a3b (diff)
downloadprofani-tty-ee8ec99e0fb5f8852d4ea8445ac4e26f043dc56b.tar.gz
Add check for existing apt-cyg in cyg_prepare() and extract installation method into separate function cyg_install_apt_cyg()
-rwxr-xr-xinstall-all.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/install-all.sh b/install-all.sh
index bd5093dd..f79c3e88 100755
--- a/install-all.sh
+++ b/install-all.sh
@@ -63,12 +63,7 @@ cygwin_prepare()
     echo Profanity installer... installing dependencies
     echo
 
-    wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
-    #wget --no-check-certificate https://raw.github.com/boothj5/apt-cyg/master/apt-cyg
-    #wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
-    chmod +x apt-cyg
-    mv apt-cyg /usr/local/bin/
-
+    if ! command -v apt-cyg &>/dev/null; then cyg_install_apt_cyg; fi
     if [ -n "$CYG_MIRROR" ]; then
         apt-cyg -m $CYG_MIRROR install git make gcc-core m4 automake autoconf pkg-config openssl-devel libexpat-devel zlib-devel libncursesw-devel libglib2.0-devel libcurl-devel libidn-devel libssh2-devel libkrb5-devel openldap-devel libgcrypt-devel libreadline-devel libgpgme-devel libtool libuuid-devel
     else
@@ -105,6 +100,18 @@ install_profanity()
     sudo make install
 }
 
+cyg_install_apt_cyg()
+{
+    echo
+    echo Profanity installer... installing apt-cyg
+    echo
+    wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
+    #wget --no-check-certificate https://raw.github.com/boothj5/apt-cyg/master/apt-cyg
+    #wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
+    chmod +x apt-cyg
+    mv apt-cyg /usr/local/bin/
+
+}
 cyg_install_lib_mesode()
 {
     echo