Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
42 lines (36 loc) · 1.33 KB

File metadata and controls

executable file
·
42 lines (36 loc) · 1.33 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
34
35
36
37
38
39
40
41
42
#!/bin/bash
SCRIPT=`readlink -f -- $0`
SCRIPTPATH=`dirname $SCRIPT`
APPDIR="${APPDIR:-$SCRIPTPATH/../..}"
# Configure the environment
prefix="{{PREFIX}}"
export TCL_LIBRARY="$(ls -d ${APPDIR}/${prefix}/share/tcltk/tcl* | tail -1)"
export TK_LIBRARY="$(ls -d ${APPDIR}/${prefix}/share/tcltk/tk* | tail -1)"
export TKPATH="${TK_LIBRARY}"
# Resolve symlinks within the image
nickname="{{PYTHON}}"
executable="${APPDIR}/${prefix}/bin/${nickname}"
if [ -L "${executable}" ]; then
nickname="$(basename $(readlink -f ${executable}))"
fi
for opt in "$@"
do
[ "${opt:0:1}" != "-" ] && break
if [[ "${opt}" =~ "I" ]] || [[ "${opt}" =~ "E" ]]; then
# Environment variables are disabled ($PYTHONHOME). Let's run in a safe
# mode from the raw Python binary inside the AppImage
"$APPDIR/${prefix}/bin/${nickname}" "$@"
exit "$?"
fi
done
# But don't resolve symlinks from outside!
if [[ "${ARGV0}" =~ "/" ]]; then
executable="$(cd $(dirname ${ARGV0}) && pwd)/$(basename ${ARGV0})"
elif [[ "${ARGV0}" != "" ]]; then
executable=$(which "${ARGV0}")
fi
# Wrap the call to Python in order to mimic a call from the source
# executable ($ARGV0), but potentially located outside of the Python
# install ($PYTHONHOME)
(PYTHONHOME="${APPDIR}/${prefix}" exec -a "${executable}" "$APPDIR/${prefix}/bin/${nickname}" "$@")
exit "$?"
Morty Proxy This is a proxified and sanitized view of the page, visit original site.