Off-Topic > SCM EXtensions

Abiword.scm command line bug

<< < (4/5) > >>

Rich:
Hi uggla

--- Quote ---SAVE_ARGS=$*
--- End quote ---
Not sure if it matters here, but I think I read somewhere that $@ is more commonly used because it preserves spaces
where $* doesn't in some situations.

uggla:
I'll fix the script for already quoted paths.

uggla:
Here's a much better script:

--- Code: ---#!/bin/sh

for p do
case ${p:0:1} in
-) params="${params} ${p}";;
/) params="${params} \"${p}\"";;
*) params="${params} \"$PWD/${p}\"";;
esac
done

cd /apps/abiword
export LD_LIBRARY_PATH="local/lib"
export PATH="local/bin:$PATH"

exec /apps/abiword/abiword ${params}

--- End code ---

uggla:
Sorry, here's a script that actually works  ;)


--- Code: ---#!/bin/sh

for arg do
case ${arg:0:1} in
-) SAVE_ARGS="${SAVE_ARGS}${arg}|";;
/) SAVE_ARGS="${SAVE_ARGS}${arg}|";;
*) SAVE_ARGS="${SAVE_ARGS}$PWD/${arg}|";;
esac
done
IFS='|'

cd /apps/abiword
export LD_LIBRARY_PATH="local/lib"
export PATH="local/bin:$PATH"

/apps/abiword/abiword ${SAVE_ARGS}
--- End code ---

Jason W:
Hi, I am not ignoring this, time is just tight now, I will visit it soon.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version