You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by fr...@apache.org on 2017/04/20 18:40:22 UTC

[33/44] incubator-trafficcontrol git commit: check if go and git installed

check if go and git installed

(cherry picked from commit 7b886e681b255a99be8d94834f9f91e2883e132e)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/d58945cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/d58945cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/d58945cf

Branch: refs/heads/2.0.x
Commit: d58945cff2f02f49bef0d002be68530d59fd0c3e
Parents: eea2511
Author: Dan Kirkwood <da...@gmail.com>
Authored: Thu Apr 13 17:04:40 2017 -0600
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Wed Apr 19 15:36:19 2017 -0600

----------------------------------------------------------------------
 traffic_ops/install/bin/postinstall | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/d58945cf/traffic_ops/install/bin/postinstall
----------------------------------------------------------------------
diff --git a/traffic_ops/install/bin/postinstall b/traffic_ops/install/bin/postinstall
index 40c3cd7..849860a 100755
--- a/traffic_ops/install/bin/postinstall
+++ b/traffic_ops/install/bin/postinstall
@@ -17,6 +17,11 @@
 # make sure installed with proper permissions
 umask 022
 
+# go and git are required, but don't want to stomp on those if already installed
+for p in git go; do
+	type $p >/dev/null 2>&1 || { echo >&2 "postinstall requires $p but it's not installed.  Aborting."; exit 1; }
+done
+
 # install carton first
 cpanm Carton