From 42e29623ed3a1f33cb98c1e084a5133042345ea2 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 8 Sep 2019 20:47:30 +0200 Subject: upslak.sh: fix path determination for kernel and modules Thanks to 0XBF @linuxquestions.org for debugging. --- upslak.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'upslak.sh') diff --git a/upslak.sh b/upslak.sh index a3e64ee..92f549b 100644 --- a/upslak.sh +++ b/upslak.sh @@ -482,7 +482,7 @@ getpath_kernelimg () { local MYDATA="${*}" [ -z "${MYDATA}" ] && echo "" - if [ -n "$(file \"${MYDATA}\" |grep -E 'x86 boot (executable|sector)')" ]; then + if [ -n "$(file "${MYDATA}" |grep -E 'x86 boot (executable|sector)')" ]; then # We have a kernel image: echo "${MYDATA}" else @@ -579,15 +579,15 @@ while [ ! -z "$1" ]; do exit ;; -i|--init) - LIVEINIT="$(cd $(dirname $2); pwd)/$(basename $2)" + LIVEINIT="$(cd "$(dirname "$2")"; pwd)/$(basename "$2")" shift 2 ;; -k|--kernel) - KERNEL="$2" + KERNEL="$(cd "$(dirname "$2")"; pwd)/$(basename "$2")" shift 2 ;; -m|--kmoddir) - KMODDIR="$2" + KMODDIR="$(cd "$(dirname "$2")"; pwd)/$(basename "$2")" shift 2 ;; -n|--netsupport) -- cgit v1.2.3