diff --git a/.travis.yml b/.travis.yml index a2381108..fd3a6f6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,25 +36,26 @@ script: travis_cargo_run_in() { [[ -d "$1" ]] && cd "$1" && - travis-cargo build && - travis-cargo test && - travis-cargo bench && - travis-cargo --only stable doc && - cd - + { + travis-cargo build && + travis-cargo test && + travis-cargo bench && + travis-cargo --only stable doc && + cd - + } || exit 1 } [[ $(changes_in "doc") ]] && echo "Changes in ./doc are not build by CI" for d in $(find -name "Cargo.toml" | grep -vE "^.$"); do dir=$(dirname $d) - changes_in $dir && \ - echo -e "\nRunning in $d\n" && \ - travis_cargo_run_in $dir + { + changes_in $dir && \ + echo -e "\nRunning in $d\n" && \ + travis_cargo_run_in $dir + } || true done - echo -e "\nRunning on top-level crate...\n" - travis_cargo_run_in "." - addons: apt: packages: diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index b5f4a833..00000000 --- a/Cargo.toml +++ /dev/null @@ -1,23 +0,0 @@ -[package] -name = "imag" -version = "0.1.0" -authors = ["Matthias Beyer "] -repository = "https://github.com/matthiasbeyer/imag" -homepage = "https://github.com/matthiasbeyer/imag" -license = "LGPLv2" -readme = "README.md" -description = "CLI PIM suite with nice API, so you can use an MUA, Editor, etc. of your choice" -keywords = ["PIM", "personal", "information", "management", "cli", "vcard", "ical", "wiki", "bookmark", "todo", "rss" ] - -[dependencies.libimagmodule] -path = "./libimagmodule" - -[dependencies.libimagrt] -path = "./libimagstore" - -[dependencies.libimagstore] -path = "./libimagstore" - -[dependencies.libimagutil] -path = "./libimagutil" - diff --git a/bin/imag b/bin/imag new file mode 100755 index 00000000..552ea9b4 --- /dev/null +++ b/bin/imag @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +version() { + echo "0.1.0" +} + +help() { + local cmds="$(commands)" + + echo " _ "; + echo " (_)_ __ ___ __ _ __ _ "; + echo " | | '_ \` _ \ / _\` |/ _\` |"; + echo " | | | | | | | (_| | (_| |"; + echo " |_|_| |_| |_|\__,_|\__, |"; + echo " |___/ "; + echo " -------------------------"; + cat < + + imag - the personal information management suite for the commandline + + imag is a PIM suite for the commandline. It consists of several commands, + called "modules". Each module implements one PIM aspect and all of these + modules can be used independently. + + Available commands: + $(for cmd in $cmds; do + echo -e "\t$(echo $cmd | sed -r 's,(.*)/imag-(.*),\2,')"; + done) + + Call a command with "imag " + Each command can be called with "--help" to get the respective helptext. + + Please visit https://github.com/matthiasbeyer/imag to view the source code, + follow the development of imag or maybe even contribute to imag. + + imag is free software. It is released under the terms of LGPLv2.1 + + (c) 2016 Matthias Beyer and contributors +EOS +} + +commands() { + [[ ! -z "$IMAG_IS_THE_SHIT" ]] && \ + find $IMAG_IS_THE_SHIT -type f -iname "imag-*" -print 2>/dev/null + find ${PATH//:/ } -maxdepth 1 -type f -iname "imag-*" -print 2>/dev/null +} + +main() { + case $1 in + --versions) + echo -n "imag "; version + for command in $(commands); do + $command --version + done + exit 0 + ;; + + --version) + version + exit 0 + ;; + + --help | -h) + help + exit 0 + ;; + + *) + local cmd=$1; shift + local executable=$(commands | grep $cmd | head -n 1) + exec $executable $* + ;; + + esac +} + +main $* diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 32486748..00000000 --- a/src/main.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - println!("It works"); -} -