3 if [ ! -d ".git" -a -z "$1" ]; then
4 echo "Usage: $0 repoistory [directories]" >&2
13 if [ ! -d ".git" ]; then
14 echo "$source_dir is not a repoistory (.git isn't found)" >&2
18 cd "$HOME"/current/projects &&
20 if [ -n "$directories" ]; then
21 mkdir -p "$directories" && cd "$directories"
24 dest_dir="`basename \"$source_dir\"`" &&
25 git clone "$source_dir" "$dest_dir" &&
28 pwd >> "$HOME"/prog/git-scripts/locate-all.list &&
29 if [ "`cat \"$source_dir\"/.git/description`" = \
30 "Unnamed repository; edit this file 'description' to name the repository." ]
32 `git var GIT_EDITOR` "$source_dir"/.git/description .git/description
34 cp -p "$source_dir"/.git/description .git
38 if [ -n "$directories" ]; then
39 dest_dir="$directories/$dest_dir"
41 exec git remote add current "$HOME"/current/projects/"$dest_dir"