Created
October 6, 2010 04:16
-
-
Save gbakernet/612819 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FWImage | |
FWPage | |
FWArticle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
$baseDir = "~/code"; | |
$flexBase = "${baseDir}/Source/ElementCatalog/OpenMarket/Gator/FlexibleAssets/AssetMaker/"; | |
$basicBase = "${baseDir}/Source/AssetStubElementCatalog/OpenMarket/AssetMaker/AssetStubFiles/StandardElements/"; | |
%details = ( | |
'basicassets.cgi', "${basicBase}*", | |
'flexattributes.cgi', "${flexBase}Attributes/*", | |
'flexassets.cgi', "${flexBase}FlexAssets/*", | |
'flexgroups.cgi', "${flexBase}FlexGroups/*", | |
'flextmpls.cgi', "${flexBase}FlexTmpls/*", | |
); | |
$to = "${baseDir}/Target/OpenMarket/ElementCatalog/OpenMarket/Xcelerate/AssetType/"; | |
# Assets | |
my($key, $value); # @cc{Declare two variables at once} | |
while ( ($key, $value) = each(%details) ) { | |
# @cc{Do some processing on @scalar{$key} and @scalar{$value}} | |
$data_file=$key; | |
open(DAT, $data_file) || die("Could not open file!"); | |
@assettypes=<DAT>; | |
close(DAT); | |
foreach $assettype (@assettypes) | |
{ | |
chop($assettype); | |
chop($assettype); | |
system "cp ${value} ${to}$assettype"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRODUCTASSET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRODUCTATTRIBUTE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRODUCTPARENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRODUCTDEF | |
PRODUCTPARENTDEF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment