appimage: Can now get a shell inside the AppImage.
- The --self_test option is no longer needed. Instead do: - # APPIMAGE_ENTER=1 ./vigil.appimage # To enter the shell - # $APPDIR/test-all
This commit is contained in:
parent
93d1fdb87a
commit
20161303fc
3 changed files with 13 additions and 15 deletions
|
|
@ -14,5 +14,13 @@ export UNION_PRELOAD="${HERE}"
|
||||||
export LD_PRELOAD="${HERE}/libunionpreload.so"
|
export LD_PRELOAD="${HERE}/libunionpreload.so"
|
||||||
export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
||||||
export PYTHONPATH=/usr/local/lib/python3.5/dist-packages:"${PYTHONPATH}"
|
export PYTHONPATH=/usr/local/lib/python3.5/dist-packages:"${PYTHONPATH}"
|
||||||
|
if [ -z $APPIMAGE_ENTER ]; then
|
||||||
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
|
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
|
||||||
exec ${EXEC} $@
|
exec ${EXEC} $@
|
||||||
|
else
|
||||||
|
if [ -z "$@" ]; then
|
||||||
|
exec /bin/bash
|
||||||
|
else
|
||||||
|
$@
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ def make_app_dir(app_dir, new_paths):
|
||||||
os.mkdir(app_dir)
|
os.mkdir(app_dir)
|
||||||
make_sub_container("ubuntu", app_dir, new_paths)
|
make_sub_container("ubuntu", app_dir, new_paths)
|
||||||
cmd("cp -a %s/tests %s" % (VIGIL_PATH, app_dir))
|
cmd("cp -a %s/tests %s" % (VIGIL_PATH, app_dir))
|
||||||
cmd("cp -a %s/test-all %s/tests" % (VIGIL_PATH, app_dir))
|
cmd("cp -a %s/test-all %s" % (VIGIL_PATH, app_dir))
|
||||||
cmd("cp %s/appimage/* %s" % (VIGIL_PATH, app_dir))
|
cmd("cp %s/appimage/* %s" % (VIGIL_PATH, app_dir))
|
||||||
# if not os.path.exists("libunionpreload.so"):
|
# if not os.path.exists("libunionpreload.so"):
|
||||||
# make_libunionpreload()
|
# make_libunionpreload()
|
||||||
|
|
|
||||||
|
|
@ -41,17 +41,11 @@ from vigil import tools
|
||||||
from vigil import worker
|
from vigil import worker
|
||||||
|
|
||||||
|
|
||||||
if "APPDIR" in os.environ:
|
|
||||||
test_usage_line = " vigil --self_test\n"
|
|
||||||
test_option_line = (" --self_test "
|
|
||||||
"Test that vigil is working properly.\n")
|
|
||||||
else:
|
|
||||||
test_usage_line, test_option_line = "", ""
|
|
||||||
USAGE = """
|
USAGE = """
|
||||||
Usage:
|
Usage:
|
||||||
vigil [options] <directory>
|
vigil [options] <directory>
|
||||||
vigil -h | --help
|
vigil -h | --help
|
||||||
%s
|
|
||||||
Example:
|
Example:
|
||||||
# vigil my_project
|
# vigil my_project
|
||||||
|
|
||||||
|
|
@ -63,7 +57,7 @@ Options:
|
||||||
the *edit command. It may contain options.
|
the *edit command. It may contain options.
|
||||||
-t THEME, --theme=THEME The pygment theme used for syntax
|
-t THEME, --theme=THEME The pygment theme used for syntax
|
||||||
highlighting. Defaults to "native".
|
highlighting. Defaults to "native".
|
||||||
%s""" % (test_usage_line, test_option_line)
|
"""
|
||||||
|
|
||||||
|
|
||||||
KEYS_DOC = """Keys:
|
KEYS_DOC = """Keys:
|
||||||
|
|
@ -1018,10 +1012,6 @@ def check_arguments():
|
||||||
if arguments["--help"]:
|
if arguments["--help"]:
|
||||||
print(cmdline_help)
|
print(cmdline_help)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
if "APPDIR" in os.environ and arguments["--self_test"]:
|
|
||||||
test_dir = os.path.join(os.environ["APPDIR"], "tests")
|
|
||||||
sys.exit(subprocess.call([os.path.join(test_dir, "test-all")],
|
|
||||||
cwd=test_dir))
|
|
||||||
worker_count = None
|
worker_count = None
|
||||||
try:
|
try:
|
||||||
if arguments["--workers"] is not None:
|
if arguments["--workers"] is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue