$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
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
exit 1
}
+[ $# -ge 1 ] || usage
GIT_HOST=git.vireo.org
REMOTE_REPOS=~/git
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
init $@
;;
add)
- add $@
+ add $@
;;
new)
- new $@
+ new $@
;;
login)
- login $@
+ login $@
;;
ls)
- list
+ list
;;
list)
- list
+ list
+ ;;
+ ls-r)
+ listremote
+ ;;
+ list-remote)
+ listremote
;;
*)