]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
find the repo dir properly
authorRudolf Polzer <divverent@xonotic.org>
Mon, 14 May 2012 14:37:38 +0000 (16:37 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 14 May 2012 14:37:38 +0000 (16:37 +0200)
misc/tools/conflict-rss.sh

index fb10ebd6c39b554e50951f6847b50da36be6feb9..9efabb7ca0d23a0f64d2d03b43b535527ff0ffa3 100755 (executable)
@@ -86,14 +86,14 @@ if [ -z "$outdir" ]; then
        set --
 fi
 
-case "$repodir" in
-       '')
-               repo=`git config remote.origin.url | cut -d / -f 4-`
-               ;;
-       *)
-               repo=$repodir # FIXME
-               ;;
-esac
+repo=$(
+       (
+               if [ -n "$repodir" ]; then
+                       cd "$repodir"
+               fi
+               git config remote.origin.url | cut -d / -f 4-
+       )
+)
 
 case "$action" in
        --init)