fix a silly bug that put everything in the same type folder

This commit is contained in:
Kegan Myers 2017-04-16 14:59:06 -05:00
parent b237504cf8
commit ebc1cb4c31
1 changed files with 3 additions and 3 deletions

View File

@ -9,11 +9,11 @@ if (argv._.length !== 2) {
}
const basePath = path.resolve(process.cwd(), argv._[0], 'public/system');
const targetPath = path.resolve(process.cwd(), argv._[1], 'images/media_attachments');
const targetPath = path.resolve(process.cwd(), argv._[1], 'images');
const targetSuffix = 'files';
const config = {
"accounts": {
accounts: {
avatars: ["original", "static"],
headers: ["original", "static"],
},
@ -70,7 +70,7 @@ Object.keys(config).forEach((type) => {
))).forEach((info) => {
info.sizes.forEach((size) => {
const sourceFile = path.join(subtypeBase, ...info.prefix, size, info[size]);
const targetDir = path.join(targetPath, info.number, targetSuffix, size);
const targetDir = path.join(targetPath, type, info.number, subtype, size);
const targetFile = path.join(targetDir, 'img_');
action(sourceFile, targetDir, targetFile);