comparison svn2cl @ 4:f27514832835

Test for existence of repository.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 09 May 2008 14:33:35 +0300
parents 2375efb3340d
children cdd7f7b6d4b0
comparison
equal deleted inserted replaced
3:407ddf6cd676 4:f27514832835
108 exit 1 108 exit 1
109 ;; 109 ;;
110 esac 110 esac
111 done 111 done
112 112
113 # test for repository
114 if test ! -e ".svn"; then
115 echo "No Subversion repository found from this directory."
116 exit 2
117 fi
118
113 # find the directory that this script resides in 119 # find the directory that this script resides in
114 prog="$0" 120 prog="$0"
115 while test -h "$prog"; do 121 while test -h "$prog"; do
116 prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$(dirname "$prog")/,"` 122 prog=`ls -ld "$prog" | sed "s/^.*-> \(.*\)/\1/;/^[^/]/s,^,$(dirname "$prog")/,"`
117 done 123 done