Changeset 4639 for trunk/tools
- Timestamp:
- Nov 20, 2000, 4:09:38 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/DoWithDirs.cmd
r4615 r4639 1 /* $Id: DoWithDirs.cmd,v 1. 6 2000-11-19 08:22:30bird Exp $1 /* $Id: DoWithDirs.cmd,v 1.7 2000-11-20 03:09:38 bird Exp $ 2 2 * 3 3 * Syntax: dowithdirs.cmd [-e<list of excludes>] [-c] [-i] [-l] [-r] <cmd with args...> … … 11 11 * Processing stops (rc=0) on the first locked directory. 12 12 * <tag> is a name of the lock. 13 * -s Skip locked directories in stead of stopping. 13 14 */ 14 15 … … 21 22 fCD = 0; 22 23 fLocking = 0; 24 fDontStop = 0; 23 25 fReverse = 0; 24 26 fExitOnLock = 1; … … 26 28 27 29 /* parse arguments */ 28 parse arg sArg.1 sArg.2 sArg.3 sArg.4 sArg.5 sArg.6 sArg.7 29 sArg.0 = 7;30 parse arg sArg.1 sArg.2 sArg.3 sArg.4 sArg.5 sArg.6 sArg.7 sArg.8 sArg.9 31 sArg.0 = 9; 30 32 do i = 1 to sArg.0 31 33 if (sArg.i <> '') then … … 80 82 end 81 83 84 when ch = 'S' then 85 do 86 fDontStop = 1; 87 end 88 82 89 otherwise 83 90 say 'unknown argument:' sArg.i; … … 154 161 /* restore old directory and return sucessfully */ 155 162 call directory sOldDir; 156 say '[ - Lock found, stops processing.]'; 157 exit(0); 163 if (fDontStop) then 164 do 165 say '[ !Lock found, skips directory.]'; 166 iterate; 167 end 168 else 169 do 170 say '[ !Lock found, stops processing.]'; 171 exit(0); 172 end 158 173 end 159 174 say '[ - warning: Skipping '|| asDirs.i || ' - directory was locked.]'; … … 214 229 say ' Processing stops (rc=0) on the first locked directory.'; 215 230 say ' <tag> is a name of the lock.'; 231 say ' -s Skip locked directories in stead of stopping.' 216 232 exit(-1) 217 233 … … 234 250 parse arg sTag 235 251 rc = stream('.dirlocked' || sTag, 'c', 'close'); 236 call SysFileDelete '.dirlocked' ;252 call SysFileDelete '.dirlocked' || sTag; 237 253 return 0; 238 254
Note:
See TracChangeset
for help on using the changeset viewer.