Uploaded image for project: 'UGENE'
  1. UGENE
  2. UGENE-438

Check if script /usr/bin/ugene (in Ubuntu distribution) really needed

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: General
    • Labels:
    • Environment:

      Ubuntu Linux

    • Affect Type:
      Userdefined

      Description

      There are script

      /usr/bin/ugene
      #!/bin/bash
      LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/ugene
      export LD_LIBRARY_PATH
      /usr/lib64/ugene/ugene "$@"
      

      that runs another script

      /usr/lib64/ugene/ugene
      #!/bin/bash
      
      appname=ugenecl
      
      # Check if '-ui' parameter is present. 
      # If it does exclude it from the list of parameters
      # and use ugeneui instead of ugenecl
      
      params=()
      
      while [[ $# -gt 0 ]];
      do
          if [ "$1" = "-ui" ]; then
              appname=ugeneui
          else
              params+=("$1")
          fi
          shift
      done
      
      dirname=$(dirname `readlink -f $0`)
      
      tmp="${dirname#?}"
      
      if [ "${dirname%$tmp}" != "/" ]; then
          dirname=$PWD/$dirname
      fi
      
      LD_LIBRARY_PATH=$dirname
      export LD_LIBRARY_PATH
      
       
      $dirname/$appname "${params[@]}"
      

      Why not to place second script directly in bin?

        Attachments

          Activity

            People

            Assignee:
            iefremov Ivan Efremov
            Reporter:
            akuznecov Alexey Kuznecov
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: