diff options
author | Evax Software <[email protected]> | 2011-04-08 10:45:38 +0200 |
---|---|---|
committer | Evax Software <[email protected]> | 2011-04-08 10:45:38 +0200 |
commit | 1d2fd523df44102a1b1ceb2310d921982b6d11c3 (patch) | |
tree | e70ce4565a1832cec029a89c09384155ac83daa1 | |
parent | f2b0266c608040a26109d587a007c8ece160041e (diff) | |
download | kerl-1d2fd523df44102a1b1ceb2310d921982b6d11c3.tar.gz kerl-1d2fd523df44102a1b1ceb2310d921982b6d11c3.tar.bz2 kerl-1d2fd523df44102a1b1ceb2310d921982b6d11c3.zip |
Fix branch support in git builds
-rwxr-xr-x | kerl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -219,7 +219,12 @@ do_git_build() exit 1 fi cd otp_src_git - git checkout $2 > /dev/null 2>&1 + git branch -a | grep "$2" > /dev/null 2>&1 + if [ "$?" -eq 1 ]; then + git checkout $2 > /dev/null 2>&1 + else + git checkout -b $2 origin/$2 > /dev/null 2>&1 + fi if [ "$?" -eq 1 ]; then echo "Couldn't checkout specified version" rm -Rf "$KERL_BUILD_DIR/$3" |