Follow upstream changes -- rest
[git-darcs-import.git] / tests / get.sh
blob072ea872748cdd593787e8d25a65450b6c9351cb
1 #!/usr/bin/env bash
2 set -ev
4 # darcs does not support cygwin paths (/cygdrive/c/foo), so if
5 # we want to run the test suite under Cygwin Bash, we must
6 # convert accordingly
7 portable_pwd () {
8 if uname | grep -i cygwin > /dev/null; then
9 cygpath -w `pwd`
10 else
11 pwd
15 rm -rf first
16 mkdir first
17 cd first
18 darcs init
19 touch t.t
20 darcs add t.t
21 darcs record -am "initial add"
22 darcs changes --context > my_context
23 IFS='' # annoying hack for cygwin and portable_pwd below
24 DIR=`portable_pwd`
25 abs_to_context=${DIR}/my_context
26 cd ..
27 darcs get first --context=${abs_to_context} second
28 rm -rf first