From 83caea1bdc34efac1fdd8f28b4d7ec46c2e7bc77 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 10 Feb 2016 18:09:01 -0500 Subject: [PATCH] Add some special path variables and add centos-ci dependencies Now we'll really fix the centos-ci build I think :) --- Makefile | 6 +++--- misc/centos-ci.py | 4 ++-- misc/{make-gopath.sh => make-path.sh} | 13 ++++++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) rename misc/{make-gopath.sh => make-path.sh} (71%) diff --git a/Makefile b/Makefile index 171dc466..62f99a05 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SHELL = /bin/bash -.PHONY: all version gopath deps run race build clean test format docs +.PHONY: all version path deps run race build clean test format docs .SILENT: clean VERSION := $(shell git describe --match '[0-9]*\.[0-9]*\.[0-9]*' --tags --dirty --always) @@ -11,8 +11,8 @@ all: docs version: @echo $(VERSION) -gopath: - ./misc/make-gopath.sh +path: + ./misc/make-path.sh deps: ./misc/make-deps.sh diff --git a/misc/centos-ci.py b/misc/centos-ci.py index e8b705f0..a2b69b14 100755 --- a/misc/centos-ci.py +++ b/misc/centos-ci.py @@ -47,8 +47,8 @@ done_nodes_url = "%s/Node/done?key=%s&ssid=%s" % (url_base, apikey, ssid) host = hosts[0] ssh = "ssh -tt -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o SendEnv=JENKINS_URL root@%s" % host -yum = 'yum -y install git wget' -omv = 'wget https://github.com/purpleidea/oh-my-vagrant/raw/master/extras/install-omv.sh && chmod u+x install-omv.sh && ./install-omv.sh && wget https://github.com/purpleidea/mgmt/raw/master/misc/make-gopath.sh && chmod u+x make-gopath.sh && ./make-gopath.sh' +yum = 'yum -y install git wget tree psmisc' +omv = 'wget https://github.com/purpleidea/oh-my-vagrant/raw/master/extras/install-omv.sh && chmod u+x install-omv.sh && ./install-omv.sh && wget https://github.com/purpleidea/mgmt/raw/master/misc/make-path.sh && chmod u+x make-path.sh && ./make-path.sh' cmd = "%s '%s && %s'" % (ssh, yum, omv) # setup print cmd r = subprocess.call(cmd, shell=True) diff --git a/misc/make-gopath.sh b/misc/make-path.sh similarity index 71% rename from misc/make-gopath.sh rename to misc/make-path.sh index 4bebfd65..1dcf9480 100755 --- a/misc/make-gopath.sh +++ b/misc/make-path.sh @@ -1,5 +1,5 @@ #!/bin/bash -# setup a simple go environment +# setup a few environment path values if ! env | grep -q '^GOPATH='; then export GOPATH="$HOME/gopath/" @@ -34,3 +34,14 @@ if ! env | grep '^PATH=' | grep -q "$GOBIN"; then fi echo "path is: $PATH" + +# add ~/bin/ to $PATH +if ! env | grep '^PATH=' | grep -q "$HOME/bin"; then + if ! grep -q '^export PATH="'"${HOME}/bin:${PATH}"'"' ~/.bashrc; then + echo 'export PATH="'"${HOME}/bin"':'"${PATH}"'"' >> ~/.bashrc + fi + export PATH="${PATH}" # basically useless + echo "setting path to: $PATH" +fi + +echo "path is: $PATH"