aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2016-01-21 20:11:55 +0500
committerAnton Bobov <abobov@gmail.com>2016-01-21 20:13:19 +0500
commit9f305e760757633623a59997358e1014d548493f (patch)
tree50788480388ad10b39226a79654f3f27dc75cd35 /install.sh
parent13594290ac32e0ecbf17a51418268a596a213451 (diff)
Fix install script.
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/install.sh b/install.sh
index 2684bd0..366fc89 100755
--- a/install.sh
+++ b/install.sh
@@ -37,16 +37,21 @@ create_link() {
done
}
+check_command() {
+ if ! $(which "$1" >/dev/null 2>&1) ; then
+ echo "No $1." >&2
+ if $(which "command-not-found" >/dev/null 2>&1) ; then
+ command-not-found "$1"
+ fi
+ fi
+}
+
after_install() {
mkdir -p $HOME/tmp/vim-undo $HOME/tmp/vim-backup
mkdir -p $HOME/.mutt/cache
touch $HOME/.mutt/aliases
- if ! which ctags >/dev/null 2>&1; then
- echo 'No ctags.' >&2
- fi
- if ! which ag >/dev/null 2>&1; then
- echo 'No ag.' >&2
- fi
+ check_command ctags
+ check_command ag
}
check_override() {