| Alex Deymo | aea4c1c | 2015-08-19 20:24:43 -0700 | [diff] [blame] | 1 | # | 
|  | 2 | # Copyright (C) 2015 The Android Open Source Project | 
|  | 3 | # | 
|  | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | # you may not use this file except in compliance with the License. | 
|  | 6 | # You may obtain a copy of the License at | 
|  | 7 | # | 
|  | 8 | #      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | # | 
|  | 10 | # Unless required by applicable law or agreed to in writing, software | 
|  | 11 | # distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | # See the License for the specific language governing permissions and | 
|  | 14 | # limitations under the License. | 
|  | 15 | # | 
| Alex Deymo | 04ef207 | 2015-08-13 08:19:16 -0700 | [diff] [blame] | 16 | { | 
|  | 17 | 'variables': { | 
|  | 18 | 'out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(image_out_dir)', | 
|  | 19 | }, | 
|  | 20 | 'rules': [ | 
|  | 21 | { | 
|  | 22 | 'rule_name': 'tar-bunzip2', | 
|  | 23 | 'extension': 'bz2', | 
|  | 24 | 'inputs': [ | 
|  | 25 | '<(RULE_INPUT_PATH)', | 
|  | 26 | ], | 
|  | 27 | 'outputs': [ | 
|  | 28 | # The .flag file is used to mark the timestamp of the file extraction | 
|  | 29 | # and re-run this action if a new .bz2 file is generated. | 
|  | 30 | '<(out_dir)/<(RULE_INPUT_ROOT).flag', | 
|  | 31 | ], | 
|  | 32 | 'action': [ | 
|  | 33 | 'sh', | 
|  | 34 | '-c', | 
|  | 35 | 'tar -xvf "<(RULE_INPUT_PATH)" -C "<(out_dir)" && touch <(out_dir)/<(RULE_INPUT_ROOT).flag', | 
|  | 36 | ], | 
|  | 37 | 'msvs_cygwin_shell': 0, | 
|  | 38 | 'process_outputs_as_sources': 1, | 
|  | 39 | 'message': 'Unpacking file <(RULE_INPUT_PATH)', | 
|  | 40 | }, | 
|  | 41 | ], | 
|  | 42 | } |