diff options
author | James Booth <boothj5@gmail.com> | 2012-09-09 22:49:39 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-09-09 22:49:39 +0100 |
commit | d9cc580c910ec765f583ff9dc64b9a7fe7126895 (patch) | |
tree | 19dddf88780425c49217e5b361dc44269019a50a | |
parent | b7c1209744175336d426b2de072206fcd92e5519 (diff) | |
download | profani-tty-d9cc580c910ec765f583ff9dc64b9a7fe7126895.tar.gz |
Fixed upgrade script to work on cygwin
-rwxr-xr-x | upgrade.sh | 78 |
1 files 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 + |