Advertisement
s243a

ff (start seamonkey)

Apr 18th, 2019
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. #LAUNCHDIR="$(cd "$(dirname "$0")"; pwd)"
  4. LAUNCHDIR=$(dirname "$(readlink -f "$0")")
  5. mkdir "$LAUNCHDIR/profile" 2> /dev/null
  6.  
  7. set_FF_ARGS(){
  8.    FF_ARGS=()
  9.    #ssdo_pos_arg_count=0
  10.    #ssdo_arg_count=0
  11.    i=1
  12.    has_profile=0
  13.    while [ $i -le $# ]; do
  14.    case $i in
  15.    -p=*|-profile=*)
  16.       has_profile=1
  17.       FF_ARGS+=( "-profile" "${i#*=}" ); ;;
  18.    -p|-profile)
  19.       has_profile=1
  20.       FF_ARGS+=( "${@[$i]}" )
  21.       let "i++" #https://askubuntu.com/questions/385528/how-to-increment-a-variable-in-bash
  22.       FF_ARGS+=( "${@[$i]}" ); ;;
  23.    *)
  24.       FF_ARGS+=( "${@[$i]}" )
  25.       ;;
  26.    esac
  27.       let "i++"
  28.    done
  29.    if [ $has_profile -eq 0 ]; then
  30.      FF_ARGS+=( "-profile" "$LAUNCHDIR/profile" )
  31.    fi
  32. }  
  33. set_FF_ARGS
  34. LD_LIBRARY_PATH=$LAUNCHDIR/:$LAUNCHDIR/extralibs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "$LAUNCHDIR/seamonkey" "${FF_ARGS[@]}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement