jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit 6eecd275c3b8be4fa84fc46c7420cf86756d7565
parent 9db09bfdce5a1ccdba12a7ad6d52a8b7f8270293
Author: Jaromil <jaromil@dyne.org>
Date:   Sun,  1 Feb 2015 19:17:02 +0100

minor fixes for a smooth install on debian 7

Diffstat:
Mbuild/build-gnu.sh | 42++++++++++++++++++------------------------
Mbuild/install-gnu.sh | 4++--
2 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/build/build-gnu.sh b/build/build-gnu.sh @@ -17,35 +17,29 @@ target=all mkdir -p build/gnu +debian_req() { + for p in "$@"; do + { dpkg --get-selections "$p" | grep -q "[[:space:]]install$" } || { + apt-get install "$p" } || { + print "Failed to install $p" + return 1 + } + done + return 0 +} + + { test "$target" = "deps" } || { test "$target" = "all" } && { - deps=() case $distro in - debian) + debian) + deps=(fetchmail msmtp mutt pinentry-curses) + deps+=(wipe notmuch sqlite3 alot abook) + deps+=(gcc make libglib2.0-dev libgnome-keyring-dev) + print "Building on Debian" print "Checking software to install" - which fetchmail >/dev/null || deps+=(fetchmail) - which msmtp >/dev/null || deps+=(msmtp) - which mutt >/dev/null || deps+=(mutt) - which pinentry >/dev/null || deps+=(pinentry-curses) - which abook >/dev/null || deps+=(abook) - which wipe >/dev/null || deps+=(wipe) - which notmuch >/dev/null || deps+=(notmuch) - which alot >/dev/null || deps+=(alot) - - print "Checking build dependencies" - which gcc >/dev/null || deps+=(gcc) - which make >/dev/null || deps+=(make) -# which gpgme-config || sudo apt-get install libgpgme11-dev - - { test -r /usr/share/doc/libgnome-keyring-dev/copyright } || { - deps+=(libglib2.0-dev libgnome-keyring-dev) } - - - { test ${#deps} -gt 0 } && { - print "Installing missing components" - sudo apt-get install ${=deps} } - + debian_req $deps ;; fedora) diff --git a/build/install-gnu.sh b/build/install-gnu.sh @@ -5,13 +5,13 @@ PREFIX=${PREFIX:-/usr/local} # TODO: separate libexec from share JARO_LIBEXEC=$PREFIX/share/jaromail JARO_SHARE=$PREFIX/share/jaromail - -[[ -w "$JARO_SHARE" ]] || { +touch $JARO_SHARE || { print "Error: cannot write to $JARO_SHARE" print "Run as root or set PREFIX to another location" return 1 } +# cleanup previous installs rm -rf "$JARO_SHARE" mkdir -p "$JARO_SHARE"