This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Comments: | |
# 1. You must add execution rights to this file (chmod u+x pre-commit) | |
# 2. You need to have the 'jq' package installed to parse the json | |
if [ "$(command -v jq )" == "" ] ; then | |
echo "jq required for pre-commit hook $0" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
if not RUBY_PLATFORM.downcase.include?("mswin") | |
config.vm.provider "virtualbox" do |v| | |
v.customize ["modifyvm", :id, "--cpus", | |
`awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' | cut -d' ' -f2 `.chomp ] | |
end | |
end |