Commit 88920d6b authored by Vitaly Lipatov's avatar Vitaly Lipatov

ginit: some fixes

parent fd6e6b5a
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod git load_mod git
test -r "$1" && fatal "Do not need any files in params"
if [ "$1" = "-h" ] ; then if [ "$1" = "-h" ] ; then
echo "ginit - initialize repo in $GIRARHOST for current project" echo "ginit - initialize repo in $GIRARHOST for current project"
echo "Use: ginit [GIRAR]" echo "Use: ginit [GIRAR]"
...@@ -18,9 +16,13 @@ if is_girar_name $1 ; then ...@@ -18,9 +16,13 @@ if is_girar_name $1 ; then
shift shift
fi fi
test -r "$1" && fatal "Do not need any files in params"
PROJECTNAME=$(get_gear_name) PROJECTNAME=$(get_gear_name)
[ -n "$PROJECTNAME" ] || fatal "Can't detect project name. Run inside git repo."
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"
git remote add $GIRARHOST $GIRARHOST:packages/$PROJECTNAME.git git remote add $GIRARHOST $GIRARHOST:packages/$PROJECTNAME.git
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