Re: scp custom and default targets
Bram Moolenaar <[email protected]> Thu, 22 Jan 2004 17:08:50 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Scott Henry Harrison wrote: > >> I really need to specify custom directory locations > >> inside a file (e.g. specifications.aap) and I would like > >> to specify PREFIX from the command-line. > > > > That's exactly what already happens by default. > > Why is command-line PREFIX not being used in the example > below? If necessary, I can provide you with a login so > that you can see for yourself. > > Python 2.3 (#2, Aug 31 2003, 17:27:29) > [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2 > > [sharrison]$ aap --version > A-A-P recipe executive version 1.049; released 2003 Nov 10 18:38:38 GMT > > [sharrison]$ more test.aap > PKGNAME = SCP-Tester-GX51-Turbo > > TESTDIR = /tmp > INSTALL_TEST += test1.txt > TESTPERMISSIONS = 0644 > > install-local : > @install_files(_no.TESTDIR, > @ _no.INSTALL_TEST,_no.TESTPERMISSIONS) > > [sharrison]$ aap -f test.aap PREFIX=scp://[email protected]// install > Aap: Copied "test1.txt" to "/tmp/test1.txt" The reason is that the install directory starts with a slash. Sorry, I didn't notice this in the previous example. It's caused by the os.path.join(dir, tail) function to ignore "dir" when "tail" starts with a slash. Thus you should set TESTDIR to "tmp" instead of "/tmp". I could change install_files() to remove the slash before joining the paths, but it's actually nice to be able to avoid prepending $PREFIX. Thus if noone objects I would simply document this behavior. -- An indication you must be a manager: You give constructive feedback to your dog. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn