aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-07 17:32:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-07 17:32:49 +1200
commit8ad39b0afe4376469d1661c3dc1688cff5302633 (patch)
tree042b29fa21e12bf71576e32698083a5482f321a6 /install
parentInclude script name in error message (diff)
downloaddotfiles-8ad39b0afe4376469d1661c3dc1688cff5302633.tar.gz
dotfiles-8ad39b0afe4376469d1661c3dc1688cff5302633.zip
Fail early if we can't find git(1) on install
Diffstat (limited to 'install')
-rwxr-xr-xinstall6
1 files changed, 6 insertions, 0 deletions
diff --git a/install b/install
index 0bacd594..7f14a532 100755
--- a/install
+++ b/install
@@ -21,6 +21,12 @@ lns() {
return
}
+# Bail if we don't have git(1)
+if ! hash git 2>/dev/null; then
+ printf '%s: Could not find git(1)!\n' "${0##*/}" >&2
+ exit 1
+fi
+
# Define dotfiles directory and check it exists
dotfiles=$HOME/.dotfiles
if [[ ! -d $dotfiles ]]; then