File: AppRun

package info (click to toggle)
gimp 3.2.0~RC2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 220,336 kB
  • sloc: ansic: 866,755; lisp: 10,855; python: 10,511; cpp: 7,330; perl: 4,469; sh: 1,439; xml: 965; yacc: 609; lex: 348; javascript: 150; makefile: 42
file content (33 lines) | stat: -rw-r--r-- 866 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

set -e

if [ -z "$APPDIR" ]; then
  export APPDIR="$(dirname "$(readlink -f "${0}")")"
  echo "Running without type2-runtime. AppDir is $APPDIR"
fi


## Minimum runtime paths. See: #13527 and #13603
export PATH="${APPDIR}/usr/bin/:$PATH"
unset LD_PRELOAD
unset LD_LIBRARY_PATH
export XDG_DATA_DIRS="${APPDIR}/usr/share/:$XDG_DATA_DIRS"


## Other needed runtime paths (added by 3_dist-gimp-goappimage.sh)
### We need to run on APPDIR due to the bundled LD linux interpreter so
### relative file paths on CLI are converted to absolute (OWD). See: #13636
export OWD="$PWD"
cd "$APPDIR"
i="$#"
while [ "$i" -gt 0 ]; do
  arg=$1
  # if arg does NOT start with slash or dash, then test for existence from $OWD
  if [ "$arg" = "${arg#/}" -a "$arg" = "${arg#-}" -a -e "$OWD/$arg" ] ; then
    arg="$OWD/$arg"
  fi
  set -- "$@" "$arg"
  shift
  i=$(($i-1))
done