Changeset 9032 for trunk/tools
- Timestamp:
- Aug 20, 2002, 6:07:11 AM (23 years ago)
- Location:
- trunk/tools/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/DoDirs.cmd
r6867 r9032 1 /* $Id: DoDirs.cmd,v 1. 4 2001-09-30 00:24:35bird Exp $1 /* $Id: DoDirs.cmd,v 1.5 2002-08-20 04:07:11 bird Exp $ 2 2 * 3 3 * Rexx script which executes a given command in each of the given … … 17 17 * Color config. 18 18 */ 19 if ( (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''), 20 & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then 19 if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then 21 20 do 22 21 sClrMak = '[35;1m' … … 30 29 sClrRst = '' 31 30 end 31 32 33 /* 34 * Build Pass 35 */ 36 sPass = getenv('_BUILD_PASS'); 37 if (sPass <> '') then 38 sPass = 'Pass '||sPass||' - ' 32 39 33 40 … … 64 71 if (directory(sDir) <> '') then 65 72 do 66 say sClrMak||'[ Entering directory:' directory()']'||sClrRst;73 say sClrMak||'['||sPass||'Entering Directory:' directory()||']'||sClrRst; 67 74 sCommand 68 75 if (rc <> 0) then 69 76 do 70 say sClrErr||'[ Failed rc='rc' directory:' directory()']'||sClrRst;77 say sClrErr||'['||sPass||'Failed rc='rc' directory:' directory()||']'||sClrRst; 71 78 exit(rc); 72 79 end 73 say sClrMak||'[ Leaving directory:' directory()']'||sClrRst;80 say sClrMak||'['||sPass||'Leaving Directory:' directory()||']'||sClrRst; 74 81 end 75 82 else 76 83 do 77 say sClrErr||'[ Failed to change directory to' sDir']'||sClrRst;84 say sClrErr||'['||sPass||'Failed to change directory to' sDir||']'||sClrRst; 78 85 exit(267); /* ERROR_DIRECTORY */ 79 86 end … … 89 96 */ 90 97 exit(0); 98 99 100 /** 101 * Get environment variable value. 102 * @returns Environment variable value if set. 103 * '' if not set. 104 * @param sVar Variable name. 105 */ 106 getenv: procedure 107 parse arg sVar 108 return value(sVar,,'OS2ENVIRONMENT'); -
trunk/tools/bin/DoMakes.cmd
r6867 r9032 1 /* $Id: DoMakes.cmd,v 1. 1 2001-09-30 00:24:35bird Exp $1 /* $Id: DoMakes.cmd,v 1.2 2002-08-20 04:07:11 bird Exp $ 2 2 * 3 3 * Rexx script which executes a given command with each of … … 16 16 * Color config. 17 17 */ 18 if ( (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''), 19 & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then 18 if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then 20 19 do 21 20 sClrMak = '[35;1m' … … 30 29 end 31 30 31 32 /* 33 * Build Pass 34 */ 35 sPass = getenv('_BUILD_PASS'); 36 if (sPass <> '') then 37 sPass = 'Pass '||sPass||' - ' 32 38 33 39 … … 55 61 if (sMakefile = ' ' | sMakefile = '') then/* If empty directory name iterate. */ 56 62 iterate; 57 say sClrMak||'[ Processing Makefile:' sMakefile']'||sClrRst;63 say sClrMak||'['||sPass||'Processing Makefile:' sMakefile||']'||sClrRst; 58 64 sCommand '-f' sMakefile 59 65 if (rc <> 0) then 60 66 do 61 say sClrErr||'[ Failed rc='rc' makefile:' sMakefile']'||sClrRst;67 say sClrErr||'['||sPass||'Failed rc='rc' makefile:' sMakefile||']'||sClrRst; 62 68 exit(rc); 63 69 end 64 say sClrMak||'[ Successfully Processed Makefile:' sMakefile']'||sClrRst;70 say sClrMak||'['||sPass||'Completed Makefile:' sMakefile||']'||sClrRst; 65 71 end 66 72 else … … 73 79 */ 74 80 exit(0); 81 82 83 /** 84 * Get environment variable value. 85 * @returns Environment variable value if set. 86 * '' if not set. 87 * @param sVar Variable name. 88 */ 89 getenv: procedure 90 parse arg sVar 91 return value(sVar,,'OS2ENVIRONMENT'); 92 -
trunk/tools/bin/DoWithDirs.cmd
r6867 r9032 1 /* $Id: DoWithDirs.cmd,v 1.1 2 2001-09-30 00:24:35bird Exp $1 /* $Id: DoWithDirs.cmd,v 1.13 2002-08-20 04:07:11 bird Exp $ 2 2 * 3 3 * Syntax: dowithdirs.cmd [-e<list of excludes>] [-c] [-i] [-l] [-r] <cmd with args...> … … 24 24 * Color config. 25 25 */ 26 if ( (value('BUILD_NOCOLOR',,'OS2ENVIRONMENT') = ''), 27 & (value('SLKRUNS',,'OS2ENVIRONMENT') = '')) then 26 if ((getenv('BUILD_NOCOLORS') = '') & (getenv('SLKRUNS') = '')) then 28 27 do 29 28 sClrMak = '[35;1m' … … 37 36 sClrRst = '' 38 37 end 38 39 40 /* 41 * Build Pass 42 */ 43 sPass = getenv('_BUILD_PASS'); 44 if (sPass <> '') then 45 sPass = 'Pass '||sPass||' - ' 39 46 40 47 … … 169 176 do 170 177 /* exectute the command in the directory */ 171 say sClrMak||'[ Entering directory:'asDirs.i']'||sClrRst;178 say sClrMak||'['||sPass||'Entering Directory: '||asDirs.i']'||sClrRst; 172 179 /* save old dir and enter the new dir. */ 173 180 sOldDir = directory(); … … 183 190 /* restore old directory and return sucessfully */ 184 191 call directory sOldDir; 185 say '[ !Lock found, stops processing.]';192 say sClrMak||'['||sPass||'!Lock found, stops processing.'||']'||sClrRst; 186 193 exit(0); 187 194 end 188 say sClrMak||'[ !Skipping ' || asDirs.i || ' - directory was locked.]'||sClrRst;195 say sClrMak||'['||sPass||'!Skipping '||asDirs.i||' - Directory was locked.'||']'||sClrRst; 189 196 fOK = 0; 190 197 end … … 207 214 if (\fIgnoreFailure) then 208 215 do 209 say sClrErr||'[ - rc = 'ret' ' || asDirs.i ||']'||sClrErr;216 say sClrErr||'['||sPass||'rc = 'ret' '||asDirs.i||']'||sClrErr; 210 217 exit(rc); 211 218 end 212 say '[ - rc = 'ret' ' || asDirs.i || ']';219 say sClrMak||'['||sPass||'rc = 'ret' '||asDirs.i||']'||sClrRst; 213 220 end 214 221 end 215 222 216 223 /* restore old directory */ 217 say sClrMak||'[ Leaving directory:' directory()']'||sClrRst;224 say sClrMak||'['||sPass||'Leaving Directory:' directory()||']'||sClrRst; 218 225 call directory sOldDir; 219 226 end … … 224 231 if (rc <> 0) then 225 232 do 226 say '[ - rc = ' || rc']';233 say sClrErr||'['||sPass||'rc = '||rc||']'||sClrRst; 227 234 if (\fIgnoreFailure) then 228 235 exit(rc); … … 270 277 return 0; 271 278 279 280 /** 281 * Get environment variable value. 282 * @returns Environment variable value if set. 283 * '' if not set. 284 * @param sVar Variable name. 285 */ 286 getenv: procedure 287 parse arg sVar 288 return value(sVar,,'OS2ENVIRONMENT'); 289
Note:
See TracChangeset
for help on using the changeset viewer.