Re: [aur-general] Eclipse plugin packaging standardization proposal
First of all, nobody really wrote /against/ this proposal and nobody said there's no need for a standard, so I suppose everyone's ok with it. If this is not the case, just speak up, otherwise I'll wait for a week from the last comment and then proceed to wikify it. On Thu, Nov 20, 2008 at 5:37 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
/ syntax is actually for replacement. The syntax above says "replace with nothing". The # and % syntax is for deletion (matching from the front or back of the word, respectively). I doubt there's any real difference as far as performance goes.
I'll keep the slash syntax, then, it's also simpler to customize. Thanks fo the great explanation :)
(2) you could use the jar command to extract a jar file instead of unzip. that's what it's made for. it's in the jdk which is a dependancy of eclipse. so you can expect user to have jar command and jdk package (jar is also in java-gcj-compat)
I modified the PKGBUILD to use jar instead of unzip, thanks. However I had to do some other changes. As I pointed out in the post: «I was noticed that I can directly use jar, which the user already has since it's part of the JRE. This is great, since it spares a makedepend! However, jar can't extract to directories other than the current one: this means that, after the directory creation, it's necessary to cd before extracting. Since there were many occurrences of the destination path I decided to use a custom variable even though somebody might not like it, because there's a great improvement in readability.» Quick link reference: http://blog.bardland.org/2008/11/20/arch-linux-eclipse-plug-in-packaging-a-p... Corrado
Hopefully this message will come through. I haven't been able to send messages to this list in the past. I've been using something pretty similar for my build eclipse plugin scripts in AUR and it's been pretty handy, although some of them need a little tweaking.
/ syntax is actually for replacement. The syntax above says "replace
with nothing". The # and % syntax is for deletion (matching from the front or back of the word, respectively). I doubt there's any real difference as far as performance goes.
Yeah, I could only see it making a difference if the feature's name contains '.jar' before the end: ie: $ FILE=mycool.jar.feature.jar $ echo ${FILE/.jar} mycool.feature*.jar* $ echo ${FILE%*.jar} mycool*.jar*.feature Using jar to decompress the archive is a great idea. Also, one thing that popped out at me is in the line:
find features -type f -name *.jar | while read feature ; do
I believe in this line, the variable '*feature*' doesn't get its own namespace, so you may want to change it to from '*feature*' to '*_feature*'.
You might also want to go with: find plugins -type f -name *.jar | while read _file; do install -Dm644 "$_file" "$_dest" done rather than
find plugins -type f -exec install -Dm644 {} ${_dest}/{} \;
in case any of the plugin names have special characters them. I've run into a couple of plugins where this was needed. If I understand correctly, it's also better to use install than cp, perhaps in case the permissions are strang on the archive (I've downloaded some tarballs where all the files were set to 777).
Cheers, Jonathan Wiersma
participants (2)
-
bardo
-
Jonathan Wiersma