git @ Cat's Eye Technologies shelf / develop-0.4
We can error out and display the usage message earlier. Chris Pressey 2 years ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
4949 dir="$1"
5050 subdir="$2"
5151
52 if [ "X$dir" = X ]; then
53 echo "Usage: _shelf_link_stuff <dir> <subdir> <find-opts>"
54 return 1
55 fi
56
5257 exclude_dirs=".git .hg venv"
5358 exclude_paths="Funicular/eg Chrysoberyl/modules Chrysoberyl/checkout"
5459 find_opts=""
5964 find_opts="$find_opts -path $ep -prune -o "
6065 done
6166 find_opts="$find_opts $3"
62 _shelf_verbose "Find-opts: <<$find_opts>>"
63
64 if [ "X$dir" = X ]; then
65 echo "Usage: _shelf_link_stuff <dir> <subdir> <find-opts>"
66 return 1
67 fi
67
6868 _shelf_verbose "find $dir $find_opts"
6969 for source in `find "$dir" $find_opts`; do
7070 base=`basename "$source"`