]> ToastFreeware Gitweb - gregoa/movein.git/blobdiff - movein
dunno
[gregoa/movein.git] / movein
diff --git a/movein b/movein
index 3a866b129d9aab89acd8229054b12d76bd4af123..00bfcab08bec9015d0a42825fe958d0701493eed 100755 (executable)
--- a/movein
+++ b/movein
@@ -1,6 +1,21 @@
 #!/bin/sh
 #
 # Copyright © 2008 Mike O'Connor <stew@vireo.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+# USA.  
 
 set -e
 
@@ -41,7 +56,9 @@ GIT_HOST=flounder.vireo.org
 REMOTE_REPOS=~/git
 LOCAL_REPOS=~/.fgits
 MRCONFIG=~/.mrconfig
+MOVEIN=~/.movein
 
+[ -e source $MOVEIN ] && source $MOVEIN
 
 init() {
 
@@ -53,12 +70,50 @@ init() {
        echo $MRCONFIG already exists
        exit 1
     fi
+    
+    if [ -e $MOVEIN ]; then
+       echo $MOVEIN already exists
+       exit 1
+    fi
+
+    echo -n "git server hostname? [git.vireo.org] " 
+    read GIT_HOST
+    if [ -z "$GIT_HOST" ]; then 
+       GIT_HOST=git.vireo.org
+    fi
+
+    echo -n "path to remote repositories? [~/git] " 
+    read REMOTE_REPOS
+    if [ -z "$REMOTE_REPOS" ]; then 
+       REMOTE_REPOS=~/git
+    fi
+
+    echo -n "Local repository directory? [~/.fgit] " 
+    read LOCAL_REPOS
+    if [ -z "$LOCAL_REPOS" ]; then 
+       LOCAL_REPOS=~/.fgits
+    fi
+
+    echo -n "Location of .mrconfig file? [~/.mrconfig] " 
+    read MRCONFIG
+    if [ -z "$MRCONFIG" ]; then 
+       MRCONFIG=~/.mrconfig
+    fi
+
+    cat <<EOF > .movein
+GIT_HOST=$GIT_HOST
+REMOTE_REPOS=$REMOTE_REPOS
+LOCAL_REPOS=$LOCAL_REPOS
+MRCONFIG=$MRCONFIG
+EOF
 
     mkdir $LOCAL_REPOS
     cat <<END > $MRCONFIG
 [DEFAULT]
 include = cat /usr/share/mr/git-fake-bare
 END
+
+    
 }