better os detection support

This commit is contained in:
mike@arpaia.co 2014-09-08 20:07:11 -07:00
parent 847a1b1afb
commit 85951e6b9b
2 changed files with 26 additions and 18 deletions

View File

@ -33,9 +33,9 @@ clean_install:
rm -rf /var/log/osquery
rm -f $(OSQUERYD_PLIST_PATH)
ifeq ($(OS),Darwin)
if [ -f $(OSQUERYD_PLIST_PATH) ];
then launchctl unload $(OSQUERYD_PLIST_PATH);
rm -f $(OSQUERYD_PLIST_PATH)
if [ -f $(OSQUERYD_PLIST_PATH) ]; then \
launchctl unload $(OSQUERYD_PLIST_PATH); \
rm -f $(OSQUERYD_PLIST_PATH); \
fi;
endif
@ -52,21 +52,25 @@ ifeq ($(OS),Darwin)
brew install snappy || brew upgrade snappy
brew install readline || brew upgrade readline
else
apt-get update
apt-get upgrade -y
apt-get install git -y
apt-get install build-essential -y
apt-get install cmake -y
apt-get install python-pip -y
apt-get install python-dev -y
apt-get install clang-3.4 -y
apt-get install clang-format-3.4 -y
apt-get install libboost1.55-all-dev -y
apt-get install libgflags-dev -y
apt-get install libgoogle-glog-dev -y
apt-get install libsnappy-dev -y
apt-get install libbz2-dev -y
apt-get install libreadline-dev -y
if [ -f /etc/lsb-release ]; then \
apt-get update; \
apt-get upgrade -y; \
apt-get install git -y; \
apt-get install build-essential -y; \
apt-get install cmake -y; \
apt-get install python-pip -y; \
apt-get install python-dev -y; \
apt-get install clang-3.4 -y; \
apt-get install clang-format-3.4 -y; \
apt-get install libboost1.55-all-dev -y; \
apt-get install libgflags-dev -y; \
apt-get install libgoogle-glog-dev -y; \
apt-get install libsnappy-dev -y; \
apt-get install libbz2-dev -y; \
apt-get install libreadline-dev -y; \
elif [ -f /etc/centos-release ]; then \
echo "centos"; \
fi;
endif
deps: os_deps

4
Vagrantfile vendored
View File

@ -4,4 +4,8 @@ Vagrant.configure("2") do |config|
box.vm.box = "ubuntu/trusty64"
end
config.vm.define "centos" do |box|
box.vm.box = "chef/centos-6.5"
end
end