Hack to allow relative paths to be specified on the command line when calling an AppImage
parent
563b13a0a8
commit
c9f49704df
|
@ -9,8 +9,13 @@ LOGFILE=$(mktemp "/tmp/AppRun-log-${APPPKG}.XXXXXXXXXX")
|
|||
BINARY="java"
|
||||
BINARY_ARGS="-jar _BINARY_"
|
||||
|
||||
. "$APPDIR/util.sh"
|
||||
|
||||
# Uncomment this if the app needs relative paths specified on the command line
|
||||
#eval arguments="$(patch_relative_paths "$@")"
|
||||
#set -- "${arguments[@]}"
|
||||
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export PATH="$PWD/jre1.7.0_17/bin:${PATH}"
|
||||
export LD_LIBRARY_PATH="$PWD/jre1.7.0_17/lib/i386:${LD_LIBRARY_PATH}"
|
||||
|
|
|
@ -9,8 +9,13 @@ LOGFILE=$(mktemp "/tmp/AppRun-log-${APPPKG}.XXXXXXXXXX")
|
|||
BINARY="./_BINARY_"
|
||||
BINARY_ARGS=
|
||||
|
||||
. "$APPDIR/util.sh"
|
||||
|
||||
# Uncomment this if the app needs relative paths specified on the command line
|
||||
#eval arguments="$(patch_relative_paths "$@")"
|
||||
#set -- "${arguments[@]}"
|
||||
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export PATH="$PWD/usr/bin/:$PATH"
|
||||
|
||||
|
|
|
@ -9,8 +9,13 @@ LOGFILE=$(mktemp "/tmp/AppRun-log-${APPPKG}.XXXXXXXXXX")
|
|||
BINARY="./_BINARY_"
|
||||
BINARY_ARGS=
|
||||
|
||||
. "$APPDIR/util.sh"
|
||||
|
||||
# Uncomment this if the app needs relative paths specified on the command line
|
||||
#eval arguments="$(patch_relative_paths "$@")"
|
||||
#set -- "${arguments[@]}"
|
||||
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export PATH="$PWD/usr/bin/:$PATH"
|
||||
|
||||
|
|
|
@ -9,8 +9,13 @@ LOGFILE=$(mktemp "/tmp/AppRun-log-${APPPKG}.XXXXXXXXXX")
|
|||
BINARY="./_BINARY_"
|
||||
BINARY_ARGS=
|
||||
|
||||
. "$APPDIR/util.sh"
|
||||
|
||||
# Uncomment this if the app needs relative paths specified on the command line
|
||||
#eval arguments="$(patch_relative_paths "$@")"
|
||||
#set -- "${arguments[@]}"
|
||||
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export PATH="$PWD/usr/bin/:$PATH"
|
||||
|
||||
|
|
|
@ -10,8 +10,13 @@ BINARY="_BINARY_"
|
|||
BINARY_ARGS=
|
||||
WINETRICKS=
|
||||
|
||||
. "$APPDIR/util.sh"
|
||||
|
||||
# Uncomment this if the app needs relative paths specified on the command line
|
||||
#eval arguments="$(patch_relative_paths "$@")"
|
||||
#set -- "${arguments[@]}"
|
||||
|
||||
cd "$APPDIR"
|
||||
. ./util.sh
|
||||
|
||||
export PATH="$PWD/usr/bin/:${PATH}"
|
||||
|
||||
|
|
13
data/util.sh
13
data/util.sh
|
@ -155,3 +155,16 @@ show_usage()
|
|||
[ -f "$usage_file" ] && cat "$usage_file"
|
||||
}
|
||||
|
||||
patch_relative_paths()
|
||||
{
|
||||
local output=()
|
||||
for i in "$@"; do
|
||||
if [ -f "$i" ]; then
|
||||
abs="$(readlink -f "$i")"
|
||||
echo "[AppImage] Converting parameter '$i' into '$abs'" >&2
|
||||
i="$abs"
|
||||
fi
|
||||
output+=("\"$i\"")
|
||||
done
|
||||
echo "(${output[@]})"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue