-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathvim.start.sh
36 lines (31 loc) · 923 Bytes
/
vim.start.sh
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
#!/bin/sh
if [ -z "$VIM" ]; then
export VIM=$APPDIR/usr/share/vim
fi
if [ -z "$VIMRUNTIME" ]; then
export VIMRUNTIME=$APPDIR/usr/share/vim/vim91
fi
export GIO_MODULE_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gio/modules
# We don't pack Python stuff, so unset the PYTHON vars set by AppRun.
# see https://github.com/AppImage/AppImageKit/blob/master/src/AppRun.c
unset PYTHONPATH
unset PYTHONHOME
unset PYTHONDONTWRITEBYTECODE
# Change back to OWD - Original Working Directory
# Set by AppImage
# see https://github.com/AppImage/AppImageKit/blob/master/src/runtime.c
cd "$OWD"
# ARGV0 should always be set, if not fall back to AppImage name
if [ -n "$ARGV0" ]; then
basename="$(basename "$ARGV0" | tr '[:upper:]' '[:lower:]')"
else
basename="$(basename "$APPIMAGE" | tr '[:upper:]' '[:lower:]')"
fi
case $basename in
vim*)
exec vim "$@"
;;
*)
exec gvim -f "$@"
;;
esac