[SOLVED] Is it appropriate to call "$EDITOR file " from PKGBUILD

I have a PKGBUILD in the AUR for my recent creation ttwm.
Installing from the AUR is a nice convenience (over a git pull, and manual build), but this hinders customization through the config.h which must be modified prior to recompiling.
I have come up with two ideas that may allow the best of both options.
1) Include a command in the PKGBUILD such as
$EDITOR config.h
which will allow the user to edit the config file right before the make command.  I know this will work, but I don't know if would be appropriate.  Are PKGBUILD expected to run 'uninterupted' or is expecting user input like this acceptable?
2) Include a command to copy a file from the user's home director (perhaps a ~/.ttwm.conf) to config.h - eg
[[ -f ~/.ttwm.conf ]] && cp ~/.ttwm.conf ./config.h
I'm not yet sure if this would even work: can makepkg access something outside the fakeroot environment like this?  And would this be acceptable, or is reading from the user's home dir inappropriate?
Any feedback would be appreciated.  I want to make building the package as easy as possible, but I also want to ensure the PKGBUILD doesn't violate any standards of expected behavior.
Last edited by Trilby (2012-08-16 21:28:00)

I think you could allow a custom config file or opening the editor depending on an environment variable. If it is not present then the package is built with the default settings. I think this is appropriate when the application is configured at compile time.
It is not too important, though since it is very easy to add a breakpoint to the PKGBUILD with read or just add the editor or copy command manually.
Edit: I like the idea of a console message in build() and/or post_install that reminds the user of modifying config.h just like in the package for tabbed.
Last edited by progandy (2012-08-16 21:48:58)

Similar Messages

  • Call .bat file from java code

    I need to call an application that uses a .bat file to execute from a java program. Is that possible?
    This is the .bat file:
    importcli.exe ciaf2735 C:\Importcli\files\SAI2735*.txt  
    importcli.exe ciaf2735 C:\Importcli\files\CI2735*.txt  
    importcli.exe ciaf2735 C:\Importcli\files\SC2735*.txt  
    importcli.exe db1800 C:\Importcli\files\*.mdb

    magaupe wrote:
    I need to call an application that uses a .bat file to execute from a java program. Is that possible?
    This is the .bat file:
    importcli.exe ciaf2735 C:\Importcli\files\SAI2735*.txt  
    importcli.exe ciaf2735 C:\Importcli\files\CI2735*.txt  
    importcli.exe ciaf2735 C:\Importcli\files\SC2735*.txt  
    importcli.exe db1800 C:\Importcli\files\*.mdb
    Hmmm, I wonder what would happen if there were a web search engine and you could research like this:
    [http://www.google.com/search?hl=en&q=call+.bat+file+from+java]

  • How to call java files from different directories

    hi, how do i call java files from a different directory??
    let say i got partA.java, and i need to include functions from partB.java which is in a different folder. how can i do that?

    Chicon wrote:
    Hi nuttynibbles,
    Before the class declaration in partA.java, you must have an import statement like :
    import someDirectory.partB;
    public class partA {
    ... and before you ask... you'll probably want to read through this http://java.sun.com/docs/books/tutorial/java/package/index.html

  • I wants to call .Exe file from Java Programme

    I wants to call .Exe file from Java programme. Please give answer with example. This very urgent. Help me

    hi
    u can use Runtime.exec() method in java.lang package
    to execute exe files
    regards
    pnp

  • How to Call .XDO file From Java Program

    Hi,
    I have developed a report in using BI Publisher version 10.1.3.
    I created the report and it only created XDO files. If I want to call XDO file from Java program how I can do that.
    What are the APIs available to do that.
    Thanks
    -Ashutosh

    Hi,
    the JavaAPI didn't work with the xdo-Files. But you can create a proxy stub for the Web Service API of BI Publisher which uses the xdo's in the repository.
    regards
    Rainer

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • Calling jar file from jsp - serious problem !

    Hi there, I'm trying to call a jar from a jsp file. I need an import clause in my jsp, to the class I want to use.
    I'm using eclipse, and while i"m writing "<%= " and the begining of my class name , he autocompletes it and automatically puts an import of my class in the top of the html. It is very convenient , but the problem is that he underling the class name (in the impot: <%@page import="myClass"%>), and I get "The import myClass cannot be resolved" error.
    I got an advice to put my class in a package, since it was in a default package. I did it. But now I have 2 problems:
    1. I can't run my jar in command window: java - jar myJar.jar. in gives me: Exception in thread "main" java.lang.NoClassDefFoundError....
    2. I still get an error - "The import myClass cannot be resolved" in the jsp, although I threw the old jar (that his class I want to use was out of package), and brought a new jar after creating it.
    I hope I managed to clarify myself. I'll be thankful of any help !!!

    Hi MSoldier.
    There are two ways to do this:
    1) You use the java.lang.Runtime classes to start the java application in your JAR file, just like you would have done it from the command line. The Runtime class has three different exec() methods that can be used to run any program just like you would from the command line. Remember, using this method you will have to write everything just like if you run your Java application from the command line, incl. classpath etc. This way your Java application will be run as a separate process. When the application finishes the process is shutdown and the resources (RAM etc.) taken by it freed, just like when you shutdown any other application.
    2) You can open the JAR file yourself from inside the JSP page, look inside the META-INF file to find the main class, and then calls the main class main method. There is an example of how to do this in the Java Tutorial available from Sun under the JAR files track. Check these links :
    The Java Tutorial at Sun
    http://java.sun.com/docs/books/tutorial/
    The JAR File Tutorial at Sun
    http://java.sun.com/docs/books/tutorial/jar/index.html
    Opening JAR Files via the Java JAR File API
    http://java.sun.com/docs/books/tutorial/jar/api/index.html
    Note however, if you have just created some classes that you want to use from inside your JSP pages, and not a separate application that needs to be run separately, you should just include the JAR file with your custom classes inside the WEB-INF/lib directory. These classes are then automatically available to your JSP pages, just like the rest of the Java API.
    I hope this answers your questions,
    Kind Regards,
    Jakob Jenkov
    Software Architect
    Jenkov Development
    www.jenkov.com

  • Call .jrxml file from jsp

    hi experts,
    i created the jasper report file, and i want to call this file through the jsp.
    plz help m.
    i written the following code but it gives the error:
    ==code==
    <%@ page import="java.sql.*" %>
    <%@ page import="java.lang.*" %>
    <%@ page import="java.lang.Object" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="net.sf.jasperreport.engine.*" %>
    <%@ page import="net.sf.jasperreport.engine.util.*" %>
    <%@ page import="net.sf.jasperreport.engine.export.*" %>
    <%@ page import="net.sf.jasperreports.engine.JasperCompileManager" %>
    <%@ page import="net.sf.jasperreports.engine.design.JRMultiClassCompiler" %>
    <%@ page import="net.sf.jasperreports.engine.JasperManager" %>
    <%@ page import="net.sf.jasperreports.engine.xml.JRXmlLoader" %>
    <%@ page import="net.sf.jasperreports.engine.JasperPrint" %>
    <%@ page import="net.sf.jasperreports.engine.JasperFillManager" %>
    <%@ page import="net.sf.jasperreports.engine.JasperExportManager" %>
    <%@ page import="net.sf.jasperreport.engine.JREmptyDataSource" %>
    <%@ page import="net.sf.jasperreports.engine.JasperReport" %>
    <%@ page import="net.sf.jasperreports.engine.design.*" %>
    <%@ page import="net.sf.jasperreports.view.JasperViewer" %>
    <%@ page import="net.sf.jasperreports.engine.JRException" %>
    <%
         String reportSource ="C:/apache-tomcat-6.0.16/webapps/ROOT/Emp/report/sample.jrxml";
         String reportDest = "C:/apache-tomcat-6.0.16/webapps/ROOT/Emp/report/sample.html";
         Map params = new HashMap();
         try
              JasperDesign jasperDesign=JRXmlLoader.load(reportSource);
              JasperManager.loadXmlDesign("sample.jrxml");
              JasperReport jasperReport =JasperCompileManager.compileReport(jasperDesign);
              JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource());
              JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
              JasperViewer.viewReport(jasperPrint);
         catch (JRException ex)
              ex.printStackTrace();
    %>
    ==error==
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 31 in the jsp file: /Emp/report/rept.jsp
    JREmptyDataSource cannot be resolved to a type
    28:           JasperDesign jasperDesign=JRXmlLoader.load(reportSource);
    29:           JasperManager.loadXmlDesign("sample.jrxml");
    30:           JasperReport jasperReport =JasperCompileManager.compileReport(jasperDesign);
    31:           JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource());
    32:           JasperExportManager.exportReportToHtmlFile(jasperPrint, reportDest);
    33:           JasperViewer.viewReport(jasperPrint);
    34:      }
    plz help m.

    Error log tells:
    JREmptyDataSource cannot be resolved to a typeYou have missed "s" in package name. Instead of:
    <%@ page import="net.sf.jasperreport.engine.JREmptyDataSource" %>do:
    <%@ page import="net.sf.jasperreports.engine.JREmptyDataSource" %>Thanks,
    Mrityunjoy

  • How to call HTML file from forms 6i

    Please can any one told me how i can call HTML file placed in my computer in specific path from forms 6i
    i tried web.show_Document('file path','_blank');
    but it doesn't work with me i don't know why and it doesn't give me any error
    thanks

    thanks you for your reply
    but it still not working with me
    i tried this
    host('iexplore C:\PPF\UserManual\index.htm');
    is it true, any advice

  • Call Excel file from Forms10g

    Dear friends,
    I've list of excel VBA file which generated the report. All the reports are used world wide and the tough job is whenever any modifications done, need to send the .xls file for more than 200 users.
    I'm trying to bring them under one roof. Is there is any possibilities to call those excel files via Forms and access through internet. We use 10g forms, so looking for the possiblities. I dont want to upload or send data to excel, just call the excel macro file from different destinations.
    Pls. share your suggesstions..
    Thanks in advance..
    Rgds,
    DL

    hi friends,
    i'm calling the forms from the server. now it is fetching the excel path, but couldnt open the excel file. I doubt whether system is looking for excel.exe in server or local machine
    declare
    searchType VARCHAR2(10);
    extHandler VARCHAR2(100);
    exePath VARCHAR2(512);
    Extension varchar2(5) := 'xls';
    X NUMBER;
    AppID PLS_INTEGER;
    BEGIN
    -- Do the registry lookup for the extension
    extHandler := Client_Win_API_Environment.Read_Registry
    ('HKEY_CLASSES_ROOT\'||'.XLS',chr(0),True);
    -- Then see what executable the handler invokes:
    exePath := Client_Win_API_Environment.Read_Registry
    ('HKEY_CLASSES_ROOT\'||extHandler||'\shell\Open\command', chr(0),True);
    :exepath:= nvl(exePath,'no value');
    X:= INSTR(exepath,'EXCEL.EXE');
    X:= X+9;
    :EXEPATH := SUBSTR(EXEPATH, 1, X)||' "g:/risk/xls/rsk_position_report.xls"';
    AppID := DDE.App_Begin('"C:\Program Files\Microsoft Office\OFFICE11/excel.exe" "g:/itops/risk/xls/rsk_position_report.xls"' ,DDE.APP_MODE_MAXIMIZED);
    exception
    when others then
    :exepath:=sqlerrm;
    END;
    this is throwing me 106500: non-ORACLE exception
    any idea?
    Rgds,
    DL

  • How to call class file from jsp without creating packages

    i m using tomcat 5.5
    i stored my class file into WEB-INF\Class directory
    how to call that class file. from my jsp page.
    i got some error.
    i used package concept,that works fine.

    i m using tomcat 5.5
    i stored my class file into WEB-INF\Class directory
    how to call that class file. from my jsp page.
    i got some error.
    i used package concept,that works fine.Then use packages.
    As of Java1.4, you can no longer import classes from the default package (no package declared) into classes that are packaged.
    All Tomcat classes are in packages, including the compiled JSP.
    Therefore: Your classes need to be in a package inorder to be imported and used by the JSP.
    Why the problem? If you know it works with packages, why try not to use them?

  • Calling RDF files from JSP files

    Hi,
    I created a report file using Oracle 9i Report Builder and save it as RDF extension.After that I deployed it into the server and it's working properly.But, when I created a simple JSP file(not a report) and try to call that RDF file from this JSP file,the web browser prompts for downloading the entire RDF file.Is there any way to aviod this prompting, and make it to proper ruuning from that JSP ??
    Thanks &Regards
    Rajesh K.R

    You are in the wrong forum
    Go to Reports

  • How to call pdf files from oracle forms

    I have a pdf file in the server , I need to call this and open when a button is pressed in the oracle forms.
    Please let me know how to do this.
    Thanks,
    Previn

    Frank,
    I have oracle applications and I want to open a pdf file located in the server from a button in oracle applications.
    Previn,
    you don't mention the Forms release you are running.
    If you are running Forms on the web, you can use
    web.show_document() to load files from the Web if
    they are accessible via HTTP.
    Frank

  • Call Batch file from MAxl Script

    Is it possible to call a windows batch file from a maxl script

    If you look at the documentaion you will see there is a shell command available

  • Call .jrxml file from java or jsp

    hello experts,
    i want to know how to call or execute the .jrxml ie report file from the jsp or java
    and how to pass the runtime query to the report?
    urgnt

    The below posts should answer your question
    [http://forums.sun.com/thread.jspa?threadID=5203324&messageID=9811077]
    [http://forums-beta.sun.com/thread.jspa?messageID=9857221]
    On the same note please make an effort to search google about jasper API.

Maybe you are looking for

  • How can i instal an older version of an iphone app?

    Two apps (NYTimes and NPR Player) stopped working on one of my two iphone 3G's:  the app logo comes up, then it's back to the home screen.  One of these apps (NYTimes) was recently updated, so I figured I'd go back to an earlier version.  I was able

  • Pavilion 23-b222ea Failing to be recovered

    I have a HP pavilion 23-b222ea its only 18 months old ive had a couple of system crashes that i have been able to restore, but this latest on has me  at the end of my tether and i dont know what else to do.  Ive attempted to restore from the HP syste

  • Db13 message error DB

    Hello everybody. After that i have installed a new system (SOLMAN 4 R2 on Maxdb)on a server where there´s already a system, i call DB13 and i receive always a dialog box error (when refreshing too): DBMRFC Function : DBM_GETF Command : DBAHIST DATE=2

  • Ping sidebar data not rendering correctly

    Sometime after updating to iTunes 10.4, I downloaded a patch and since then, my Ping sidebar displays only plain text content listings and buttons, and these are all scattered about the sidebar. Most of the area though is blank... I just updated to i

  • Is SSD of Macbook Pro Retina Display upgradable

    I have recently purchased (19th November,2014) Macbook Pro, Retina Display, 13' i5 Processor with SSD 128 GB. Now I badly want to expand my SSD with another 128 GB. Please advise me how I will do that. What is the cost for it?