Skip to content

Commit

Permalink
macOS: add scripts for use with pkgbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
AllinCottrell committed Jan 8, 2025
1 parent d499eac commit b815b39
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
23 changes: 23 additions & 0 deletions osx/gnuplot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# get this script's directory
BINDIR=`dirname "$0"`

# determine the Resources directory
RES="$BINDIR"/..

export G_FILENAME_ENCODING=UTF-8

# location of gnuplot help file
export GNUHELP="$RES"/share/gnuplot/6.0/gnuplot.gih
# location of PostScript resources
export GNUPLOT_PS_DIR="$RES"/share/gnuplot/6.0/PostScript
# preferred terminal
export GNUTERM=wxt

# Strip out the argument added by the OS, if any
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
shift 1
fi

exec "$BINDIR"/gnuplot "$@"
30 changes: 30 additions & 0 deletions osx/gretlcli.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# get this script's directory
BINDIR=`dirname "$0"`

# determine the Resources directory
RES="$BINDIR"/..

export GRETL_HOME="$RES"/share/gretl/

# GTK2-specific info (harmless for GTK3?)
export PANGO_SYSCONFDIR="$RES"/etc
export PANGO_RC_FILE="$RES"/etc/pango/pangorc
export PANGO_LIBDIR="$RES"/lib

export G_FILENAME_ENCODING=UTF-8

# location of gnuplot help file
export GNUHELP="$RES"/share/gnuplot/6.0/gnuplot.gih
# location of PostScript resources
export GNUPLOT_PS_DIR="$RES"/share/gnuplot/6.0/PostScript

export "PATH=$BINDIR:$PATH"

# Strip out the argument added by the OS, if any
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
shift 1
fi

exec "$BINDIR"/gretlcli "$@"

0 comments on commit b815b39

Please sign in to comment.