mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
[utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn
check. llvm-svn: 156836
This commit is contained in:
parent
c4a8a76048
commit
bf0bf743d7
@ -16,7 +16,7 @@ fi
|
||||
cd $1
|
||||
if [ -d .svn ]; then
|
||||
svn info | grep 'URL:' | cut -d: -f2-
|
||||
elif [ -d .git/svn ]; then
|
||||
elif [ -f .git/svn/.metadata ]; then
|
||||
git svn info | grep 'URL:' | cut -d: -f2-
|
||||
elif [ -d .git ]; then
|
||||
git remote -v | grep 'fetch' | awk '{ print $2 }'
|
||||
|
@ -16,7 +16,7 @@ fi
|
||||
cd $1
|
||||
if [ -d .svn ]; then
|
||||
svnversion | sed -e "s#\([0-9]*\)[A-Z]*#\1#"
|
||||
elif [ -d .git/svn ]; then
|
||||
elif [ -f .git/svn/.metadata ]; then
|
||||
git svn info | grep 'Revision:' | cut -d: -f2-
|
||||
elif [ -d .git ]; then
|
||||
git log -1 --pretty=format:%H
|
||||
|
Loading…
Reference in New Issue
Block a user