4 echo "Usage: $0 repoistory [directories]" >&2
8 cd "$1" && source_dir="`pwd`" &&
10 if [ ! -d ".git" ]; then
11 echo "$source_dir is not a repoistory (.git isn't found)" >&2
15 cd "$HOME"/current/projects &&
17 if [ -n "$directories" ]; then
18 mkdir -p "$directories" && cd "$directories"
21 dest_dir="`basename \"$source_dir\"`" &&
22 git clone "$source_dir" "$dest_dir" &&
25 if [ "`cat \"$source_dir\"/.git/description`" = \
26 "Unnamed repository; edit this file 'description' to name the repository." ]
28 "${VISUAL:-${EDITOR:-vi}}" "$source_dir"/.git/description .git/description
30 cp -p "$source_dir"/.git/description .git
34 if [ -n "$directories" ]; then
35 dest_dir="$directories/$dest_dir"
37 exec git remote add current "$HOME"/current/projects/"$dest_dir"