]> ToastFreeware Gitweb - gregoa/movein.git/blobdiff - movein
Merge branch 'master' into gregoa
[gregoa/movein.git] / movein
diff --git a/movein b/movein
index f6d54edc8c16d8ad3c0417aee80492266fd7a887..c6c51370d26ad90d78d30a5a51e91fe00ec0ea01 100755 (executable)
--- a/movein
+++ b/movein
@@ -34,6 +34,8 @@ SYNOPSIS
   $bn init
   $bn ls
   $bn list
+  $bn ls-r
+  $bn list-remote
   $bn add repository_name
   $bn new repository_name file1 [file2 file3...]
   $bn login repository_name
@@ -44,7 +46,11 @@ COMMANDS
 
   ls
   list
-      show a list of repositories
+      show a list of local repositories
+
+  ls-r
+  list-remote
+      show a list of remote repositories
 
   add repository_name
       checkout the repository from the remote host and add it to
@@ -63,6 +69,7 @@ EOF
     exit 1
 }
 
+[ $# -ge 1 ] || usage
 
 GIT_HOST=git.vireo.org
 REMOTE_REPOS=~/git
@@ -166,6 +173,12 @@ list() {
     find "${LOCAL_REPOS}" -mindepth 1 -maxdepth 1 -type d | sed 's,^.*/\([^/]*\).git$,\1,'
 }
 
+listremote() {
+    ssh $GIT_HOST "
+        find '${REMOTE_REPOS}' -mindepth 1 -maxdepth 1 -type d | sed 's,^.*/\([^/]*\).git$,\1,'
+    " </dev/null
+}
+
 new() {
     if [ $# -lt 2 ]; then 
        usage
@@ -217,19 +230,25 @@ case "$command" in
        init $@
        ;;
     add)
-        add $@
+       add $@
        ;;
     new)
-        new $@
+       new $@
        ;;
     login)
-        login $@
+       login $@
        ;;
     ls)
-        list
+       list
        ;;
     list)
-        list
+       list
+       ;;
+    ls-r)
+       listremote
+       ;;
+    list-remote)
+       listremote
        ;;
 
     *)