Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #LAUNCHDIR="$(cd "$(dirname "$0")"; pwd)"
- LAUNCHDIR=$(dirname "$(readlink -f "$0")")
- set_FF_ARGS(){
- FF_ARGS=()
- #ssdo_pos_arg_count=0
- #ssdo_arg_count=0
- i=1
- has_profile=0
- while [ $i -le $# ]; do
- case "${@:$i:1}" in
- -p=*|-profile=*)
- arg="${@:$i:1}"; opt="${val%%=*}"; val="${val#*=}"
- FF_ARGS+=( "$opt" "$val" );
- if [ "${val%%=*}" = "-profile" ]; then
- profile_dir="${val#*=}"
- has_profile=1
- fi; ;;
- -p|-profile)
- opt="${@:$i:1}"
- FF_ARGS+=( "$opt" )
- let "i++" #https://askubuntu.com/questions/385528/how-to-increment-a-variable-in-bash
- val="${@:$i:1}"
- if [ "$opt" = "-profile" ]; then
- profile_dir="$val"
- has_profile=1
- fi
- FF_ARGS+=( "$val" ); ;;
- *)
- FF_ARGS+=( "${@:$i:1}" )
- ;;
- esac
- let "i++"
- done
- if [ $has_profile -eq 0 ]; then
- FF_ARGS+=( "-profile" "$LAUNCHDIR/profile" )
- profile_dir="$LAUNCHDIR/profile"
- fi
- }
- set_FF_ARGS "$@"
- mkdir -p "$profile_dir" #2> /dev/null
- 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