Skip to content

Commit a41ffc4

Browse files
Irfan SharifIrfan Sharif
Irfan Sharif
authored and
Irfan Sharif
committed
Adds option during migrate source to have files in lowercase
Signed-off-by: Irfan Sharif <[email protected]>
1 parent d2acfb4 commit a41ffc4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/views/projectExplorer/migrateSource.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ interface MigrationConfig {
2020
sourceFiles: string[];
2121
automaticRename: boolean;
2222
fixIncludes: boolean;
23-
importText: boolean
23+
importText: boolean;
24+
lower: boolean;
2425
}
2526

2627
/**
@@ -101,7 +102,7 @@ export async function migrateSource(iProject: IProject, library: string): Promis
101102

102103
// Run CVTSRCPF
103104
const cvtsrcpfResult = await connection.sendCommand({
104-
command: `export PATH="/QOpenSys/pkgs/bin:$PATH:" && /QOpenSys/pkgs/bin/makei cvtsrcpf ${migrationConfig.defaultCCSID ? `-c ${migrationConfig.defaultCCSID}` : ``} ${migrationConfig.importText ? `-t` : ``} ${sourceFile} ${library}`,
105+
command: `export PATH="/QOpenSys/pkgs/bin:$PATH:" && /QOpenSys/pkgs/bin/makei cvtsrcpf ${migrationConfig.defaultCCSID ? `-c ${migrationConfig.defaultCCSID}` : ``} ${migrationConfig.importText ? `-t` : ``} ${migrationConfig.lower ? `-l` : ``} ${sourceFile} ${library}`,
105106
directory: directoryPath
106107
});
107108

@@ -224,7 +225,8 @@ export async function getMigrationConfig(iProject: IProject, library: string): P
224225
.addInput(`srcLib`, l10n.t('Source Library'), l10n.t('The name of the library containing the source files to migrate.'), { default: library, readonly: true })
225226
.addInput(`defaultCCSID`, l10n.t('Default CCSID'), l10n.t('The CCSID to be used when the source file is 65535.'), { default: `*JOB`, minlength: 1 })
226227
.addSelect(`workspaceFolder`, l10n.t('Workspace folder'), projectSelectItems, l10n.t('The workspace folder to which the files are to be downloaded to.'))
227-
.addCheckbox(`importText`, l10n.t('Import Member Text'), l10n.t('Imports member text at top of source as comment.'), true);
228+
.addCheckbox(`importText`, l10n.t('Import Member Text'), l10n.t('Imports member text at top of source as comment.'), true)
229+
.addCheckbox(`lower`, l10n.t('Lowercase Filenames'), l10n.t('The generated source file names will be in lowercase.'), true);
228230

229231
// Clean up tab
230232
cleanUpTab
@@ -267,6 +269,8 @@ export async function getMigrationConfig(iProject: IProject, library: string): P
267269
delete data.fixIncludes;
268270
const importText = data.importText;
269271
delete data.importText;
272+
const lower = data.lower;
273+
delete data.lower;
270274

271275
const sourceFiles = Object.entries<boolean>(data)
272276
.filter(sourceFile => sourceFile[1] === true)
@@ -278,7 +282,8 @@ export async function getMigrationConfig(iProject: IProject, library: string): P
278282
sourceFiles: sourceFiles,
279283
automaticRename: automaticRename,
280284
fixIncludes: fixIncludes,
281-
importText: importText
285+
importText: importText,
286+
lower: lower
282287
};
283288
}
284289
}

0 commit comments

Comments
 (0)