4 echo "Usage: $0 repoistory" >&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 &&
16 dest_dir="`basename \"$source_dir\"`" &&
17 git clone "$source_dir" "$dest_dir" &&
20 if [ "`cat \"$source_dir\"/.git/description`" = \
21 "Unnamed repository; edit this file 'description' to name the repository." ]
23 "${VISUAL:-${EDITOR:-vi}}" "$source_dir"/.git/description .git/description
25 cp -p "$source_dir"/.git/description .git
29 exec git remote add current "$HOME"/current/projects/"$dest_dir"