diff options
author | James Murty <james@murty.co> | 2014-05-23 21:00:39 +0100 |
---|---|---|
committer | James Murty <james@murty.co> | 2014-05-23 21:00:39 +0100 |
commit | 82ca769cc828dd06ac5768a96e70662a29f1f1fc (patch) | |
tree | 7e3d257278c7b1e7c40a7502290cf7757f43fe55 | |
parent | 456d22cb3c7ba60e15d5d0f7de771c2acf573481 (diff) | |
download | git-fat-82ca769cc828dd06ac5768a96e70662a29f1f1fc.tar.gz |
Make test-restrospective.sh test script compatible with OSX
-rwxr-xr-x | test-retroactive.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test-retroactive.sh b/test-retroactive.sh index dd02367..7dad627 100755 --- a/test-retroactive.sh +++ b/test-retroactive.sh @@ -1,8 +1,14 @@ #!/bin/sh -ex +# Use Python's abspath as substitute if realpath isn't available (e.g. on OSX) +command -v realpath >/dev/null 2>&1 || realpath() { + python -c 'import os, sys; print os.path.abspath(sys.argv[1])' $1 +} + git init retro cd retro cp /usr/share/dict/words words.big +chmod u+w words.big git add words.big git commit -m'Add big file without using git-fat' sort words.big > sorted.big |