diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-07 18:43:00 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-07 18:43:00 +0000 |
commit | 119bb276b969b8effcc00f1300e2b32af0bb2012 (patch) | |
tree | 8e11ad5bbe5830b010b7f07e8d383377f93cae8e /trunk | |
parent | 3b194aab45656d429b752bf4f34f781c1fad0463 (diff) | |
download | simplepkg-119bb276b969b8effcc00f1300e2b32af0bb2012.tar.gz simplepkg-119bb276b969b8effcc00f1300e2b32af0bb2012.tar.bz2 |
common.sh: small fix on svn_check
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@306 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/lib/common.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 275c355..36bbb4a 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -443,18 +443,28 @@ function svn_check { # check if a file is under svn # usage: svn_check <file> - local cwd + local cwd folder cwd="`pwd`" - cd `dirname $1` + folder="`dirname $1`" + + if [ -d "$folder/.svn" ]; then + + cd $folder + + if [ "`svn status $1 | awk '{ print $1 }'`" == "?" ]; then + return 1 + else + return 0 + fi + + cd $cwd - if [ "`svn status $1 | awk '{ print $1 }'`" == "?" ]; then - return 1 else - return 0 - fi - cd $cwd + return 1 + + fi } |