From d9cc580c910ec765f583ff9dc64b9a7fe7126895 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Sep 2012 22:49:39 +0100 Subject: [PATCH 1/4] Fixed upgrade script to work on cygwin --- upgrade.sh | 78 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 13 deletions(-) diff --git a/upgrade.sh b/upgrade.sh index 230dec64..ef7910d2 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -1,14 +1,66 @@ #!/bin/sh -echo -echo Profanity installer... upgrading Profanity -echo -./bootstrap.sh -./configure -make clean -make -sudo make install -echo -echo Profanity installer... upgrade complete! -echo -echo Type \'profanity\' to run. -echo + +linux_upgrade() +{ + echo + echo Profanity installer... upgrading Profanity + echo + ./bootstrap.sh + ./configure + make clean + make + sudo make install + echo + echo Profanity installer... upgrade complete! + echo + echo Type \'profanity\' to run. + echo +} + +cygwin_upgrade() +{ + echo + echo Profanity installer... upgrading Profanity + echo + export LIBRARY_PATH=/usr/local/lib + ./bootstrap.sh + ./configure + make clean + make + sudo make install + echo + echo Profanity installer... upgrade complete! + echo + echo Type \'profanity\' to run. + echo +} + +OS=`uname -s` +SYSTEM=unknown + +if [ "${OS}" = "Linux" ]; then + SYSTEM=linux +else + echo $OS | grep -i cygwin + if [ "$?" -eq 0 ]; then + SYSTEM=cygwin + fi +fi + +case "$DIST" in +unknown) echo The upgrade script will not work on this OS. + echo Try a manual upgrade instead. + exit + ;; +linux) fedora_prepare + install_head_unit + install_lib_strophe + install_profanity + ;; +cygwin) debian_prepare + install_head_unit + install_lib_strophe + install_profanity + ;; +esac + From 3f4f08ee9372dbbc388cee5028310e63a6958b81 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Sep 2012 22:51:07 +0100 Subject: [PATCH 2/4] Fixed last fix --- upgrade.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/upgrade.sh b/upgrade.sh index ef7910d2..91753cea 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -52,15 +52,9 @@ unknown) echo The upgrade script will not work on this OS. echo Try a manual upgrade instead. exit ;; -linux) fedora_prepare - install_head_unit - install_lib_strophe - install_profanity +linux) linux_upgrade ;; -cygwin) debian_prepare - install_head_unit - install_lib_strophe - install_profanity +cygwin) cygwin_upgrade ;; esac From 334822122b8d14068ff06c702fccc35ada1c335a Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Sep 2012 22:52:02 +0100 Subject: [PATCH 3/4] Fixed fix for last fix --- upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade.sh b/upgrade.sh index 91753cea..e42213f0 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -47,7 +47,7 @@ else fi fi -case "$DIST" in +case "$SYSTEM" in unknown) echo The upgrade script will not work on this OS. echo Try a manual upgrade instead. exit From 5df7d0cff194c5255f2ffa69aea48ebf7afc2a4d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Sep 2012 22:55:28 +0100 Subject: [PATCH 4/4] Removed sudo from cygwin upgrade script --- upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade.sh b/upgrade.sh index e42213f0..e2ed3d3b 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -27,7 +27,7 @@ cygwin_upgrade() ./configure make clean make - sudo make install + make install echo echo Profanity installer... upgrade complete! echo