- Timestamp:
- 10/04/2009 23:15:24 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
confman.8.in (modified) (1 diff)
-
confman.in (modified) (1 diff)
-
confmandoc.sh (modified) (2 diffs)
-
confmanlib.sh.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confman.8.in
r417 r451 150 150 Displays the log entires for the file or directory specified by 151 151 .Ar working_copy . 152 .It Cm create Ar module 153 A new module, named 154 .Ar module , 155 will appear as a top-level-directory in your working copy. This change will 156 also be committed to the repository at the same time. 152 .It Cm create Ar module [ Ar module Ar ... ] 153 Creates one or more modules for the 154 .Ar module 155 arguments provided. New modules will appear in the top-level-directory of 156 your working copy. This change will also be committed to the repository 157 at the same time. 157 158 .It Cm rmmod Ar module 158 159 Delete the specified -
trunk/confman.in
r443 r451 90 90 else 91 91 conf_lock_wcopy 92 local module=$1 93 conf_create_module $module || exit 1 92 conf_create_modules "$@" || exit 1 94 93 conf_unlock_wcopy 95 94 fi -
trunk/confmandoc.sh
r447 r451 41 41 $MYNAME audit 42 42 $MYNAME log [ working_copy ] 43 $MYNAME create module 43 $MYNAME create module [ module ... ] 44 44 $MYNAME rmmod module 45 45 $MYNAME rename oldmodule newmodule … … 100 100 101 101 Usage: 102 $MYNAME create module 103 104 The create command will cause a new module, named module, to appear as a 105 top-level-directory in your working copy. This change will also be made to 106 the repositry at the same time. 102 $MYNAME create module [ module ... ] 103 104 Creates one or more modules for the module arguments provided. 105 New modules will appear in the top-level-directory of your work- 106 ing copy. This change will also be committed to the repository 107 at the same time. 107 108 108 109 EOF -
trunk/confmanlib.sh.in
r449 r451 165 165 } 166 166 167 function conf_create_modules { 168 local module 169 local newmodules 170 local rc=0 171 172 for module in "$@"; do 173 if conf_create_module "$module"; then 174 # Keep track of the modules that were successfully created 175 # avoid inadvertently committing outstanding changes to 176 # pre-existing modules 177 if [ -z "$newmodules" ]; then 178 newmodules="$module" 179 else 180 newmodules="$newmodules,$module" 181 fi 182 else 183 rc=1 184 fi 185 done 186 187 # $newmodules is in the form foo,bar,baz. This eval trick forces 188 # curly brace expansion. 189 if echo "$newmodules" | grep -q ','; then 190 @SVN@ commit $(eval echo ${WORK_PATH}/{$newmodules}) \ 191 $(eval echo ${WORK_PATH}/${REPO_CHECKPTS}/{$newmodules}) -m \ 192 "Created directory structure for $newmodules --`whoami`" 193 elif [ -n "$newmodules" ]; then 194 # We test -n for this case because $newmodules might 195 # be empty, i.e. no new modules were created 196 @SVN@ commit ${WORK_PATH}/$newmodules \ 197 ${WORK_PATH}/${REPO_CHECKPTS}/$newmodules -m \ 198 "Created directory structure for $newmodules --`whoami`" 199 fi 200 201 return $rc 202 } 203 167 204 # Assumes that we already have core setup in our work path. 168 205 function conf_create_module { … … 177 214 @SVN@ mkdir ${WORK_PATH}/$module 178 215 @SVN@ mkdir ${WORK_PATH}/${REPO_CHECKPTS}/$module 179 @SVN@ commit ${WORK_PATH}/${module} \180 ${WORK_PATH}/${REPO_CHECKPTS}/$module -m \181 "Created directory structure for ${module} --`whoami`"182 216 183 217 return 0
Note: See TracChangeset
for help on using the changeset viewer.
