Commit eecfb9af authored by Vitaly Lipatov's avatar Vitaly Lipatov

ginit: use get_root_git_dir functions instead $(pwd)

parent 7fc83212
...@@ -18,7 +18,9 @@ if is_girar_name $1 ; then ...@@ -18,7 +18,9 @@ if is_girar_name $1 ; then
shift shift
fi fi
PROJECTNAME=$(basename `pwd`) # FIXME
PROJECTNAME=$(basename `get_root_git_dir`)
echo "Create remote $PROJECTNAME repo in $GIRARHOST:" echo "Create remote $PROJECTNAME repo in $GIRARHOST:"
ssh $GIRARHOST git-init-db $PROJECTNAME.git ssh $GIRARHOST git-init-db $PROJECTNAME.git
echo "Create $GIRARHOST remote repo alias" echo "Create $GIRARHOST remote repo alias"
......
...@@ -20,6 +20,16 @@ get_current_branch() ...@@ -20,6 +20,16 @@ get_current_branch()
git branch | grep '^\*' | sed 's/^..//' | tr -d "\n" git branch | grep '^\*' | sed 's/^..//' | tr -d "\n"
} }
get_root_git_dir()
{
# FIXME
if [ -d ../.git ] ; then
readlink -f $(pwd)/..
return
fi
pwd
}
# Check if $1 like git.alt or git.eter, git.something # Check if $1 like git.alt or git.eter, git.something
is_girar_name() is_girar_name()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment