summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Murty <james@murty.co>2014-05-23 21:00:39 +0100
committerJames Murty <james@murty.co>2014-05-23 21:00:39 +0100
commit82ca769cc828dd06ac5768a96e70662a29f1f1fc (patch)
tree7e3d257278c7b1e7c40a7502290cf7757f43fe55
parent456d22cb3c7ba60e15d5d0f7de771c2acf573481 (diff)
downloadgit-fat-82ca769cc828dd06ac5768a96e70662a29f1f1fc.tar.gz
Make test-restrospective.sh test script compatible with OSX
-rwxr-xr-xtest-retroactive.sh6
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