4 echo "Usage: $0 project_name dir" >&2
11 if [ "$project_name" = "$dir" ]; then
12 echo "Error: The script $0 cannot yet move a project into a subdirectory of the same name" >&2
18 path="`git config --get $config_option`"
19 new_path="`echo \"$path\" | sed \"s@$project_name@$dir/$project_name@\"`"
20 git config "$config_option" "$new_path"
23 for project_dir in "$HOME"/current/projects "$HOME"/prog/Python \
24 "$HOME"/Internet/WWW/htdocs/git.phdru.name; do
25 if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then
26 pname="$project_name".git
31 if [ ! -d "$project_dir/$pname" ]; then
32 echo "Error: $project_dir/$pname does not exist" >&2
36 if [ -d "$project_dir/$dir" ]; then
37 echo "Error: $project_dir/$dir already exists" >&2
42 for project_dir in "$HOME"/current/projects "$HOME"/prog/Python \
43 "$HOME"/Internet/WWW/htdocs/git.phdru.name; do
44 if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then
45 pname="$project_name".git
52 if [ "$project_dir" = "$HOME"/Internet/WWW/htdocs/git.phdru.name ]; then
53 chmod u=rwX,go=rX "$dir"
57 for remote in `git remote`; do
58 fix_path "remote.$remote.url"