Installing JEdit X 2.26 using the -exec switch

Version 2

    Verified Product Versions

    LANDESK Management Suite 9.5

    Problem:

     

    When using Software Distribution to deploy the JEdit X dmg file JEdit is not installed

     

     

    Cause

     

    The JEdit DMG file contains a folder that needs to be copied to the /Applications folder for installation. LANDesk Software Distribution does not have a default action for handling a folder contained inside a DMG.

     

     

    Resolution

     

    A script needs to be made that LANDesk can run to install the software. It is recommended that the script be created in a text editor (pico, vi, bbedit, etc.) not a word processing program.

     

    This example will use JEdit X 2.26

     

       
    1. Create a script that contains commands necessary to install the software. Such a script may look like this:

          

      #!/bin/sh
      #Copy Jedit folder to /Applications

      cp -pr /Volumes/Jedit\ X\ 2.26\ Disk/Jedit\ X\ Folder /Applications/Jedit\ X\ Folder

      Note: We have received reports that scripts created in notepad and other windows programs do not work

       
    2. After creating the script make it executable (chmod +x).
    3. Put the script in the JEDIT DMG file or create a new DMG that contains the script and the contents of the JEdit DMG.
    4. Put the DMG with the script in you package repository.
    5. When creating the Distribution Package for the DMG the -exec command needs to be added to the Install/Uninstall Options section.                       
         
      1. In the console go to Distribution Packages.
      2. Create a new Macintosh Package.
      3. Give it a Name.
      4. Give it a Description.
      5. Set the Primary file by putting in the URL to your Package Repository and selecting the DMG containing the script.
      6. Click on Install/Uninstall Options in the left pane.
      7. In the Enter command line or select options above and edit command line for MSI package: field type in -exec scriptPath/Name.

        Example if the script is named JEditIntall.sh and is in the root of the DMG file you would enter -exec JEditInstall.sh

        Note: The -exec switch adds the path to the root of the DMG to whatever parameter is passed to it. Although the path to JEditInstall.sh is /Volumes/JEdit\ X\ 2.26\ Disk/JEditInstall.sh when LANDesk executes the script the path starts at the root of the DMG.

      8.