diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-08 21:07:53 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-08 21:07:53 +0200 |
commit | 9ad292165924bdf8927551d3fdc960066dc3ec41 (patch) | |
tree | a0116e2eb17b87b85fcceb3531e7826e797839c1 /builder_install.py | |
parent | c5b3d913a3cbadbef0f378968db7711d82920295 (diff) | |
download | meson-9ad292165924bdf8927551d3fdc960066dc3ec41.zip meson-9ad292165924bdf8927551d3fdc960066dc3ec41.tar.gz meson-9ad292165924bdf8927551d3fdc960066dc3ec41.tar.bz2 |
Can install targets.
Diffstat (limited to 'builder_install.py')
-rwxr-xr-x | builder_install.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/builder_install.py b/builder_install.py index a31c133..4f2a295 100755 --- a/builder_install.py +++ b/builder_install.py @@ -14,16 +14,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys, pickle +import sys, pickle, os, shutil class InstallData(): - def __init__(self, src_dir, build_dir): - self.src_dir = src_dir - self.build_dir = build_dir + def __init__(self): + self.targets = [] def do_install(datafilename): ifile = open(datafilename, 'rb') d = pickle.load(ifile) + for t in d.targets: + fullfilename = t[0] + outdir = t[1] + fname = os.path.split(fullfilename)[1] + outname = os.path.join(outdir, fname) + print('Copying %s to %s' % (fname, outdir)) + os.makedirs(outdir, exist_ok=True) + shutil.copyfile(fullfilename, outname) if __name__ == '__main__': if len(sys.argv) != 2: |