diff options
author | B Stack <bgstack15@gmail.com> | 2020-07-14 11:59:29 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-07-14 11:59:29 -0400 |
commit | 9e28226d425acdb31cb988b0656535fc656398f9 (patch) | |
tree | 053350b7e3c79ad0bb1afef2f556faea8aa05ed2 /irfanview/irfanview-common | |
parent | Merge branch 'waterfox-bump' into 'master' (diff) | |
download | stackrpms-9e28226d425acdb31cb988b0656535fc656398f9.tar.gz stackrpms-9e28226d425acdb31cb988b0656535fc656398f9.tar.bz2 stackrpms-9e28226d425acdb31cb988b0656535fc656398f9.zip |
fix #21 irfanview invocation problems again
Diffstat (limited to 'irfanview/irfanview-common')
-rwxr-xr-x | irfanview/irfanview-common | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/irfanview/irfanview-common b/irfanview/irfanview-common index 9c32c98..9dcb4b0 100755 --- a/irfanview/irfanview-common +++ b/irfanview/irfanview-common @@ -12,6 +12,7 @@ # 2019-06-16 replace winepath call with wine $WINEPATH_BIN # 2019-06-16 split into package-arch-specific and common scripts # 2020-05-20 handle multiple filenames correctly now, including removing \r from winepath output +# 2020-07-14 use echo binary instead of shell builtin # Usage: # called from irfanview (which is symlink to irfanview32 or ifanview64) # Do not use this by itself. @@ -25,7 +26,8 @@ then false else -IV_VERSION="2020-05-20a" +IV_VERSION="2020-07-14a" +echobin="$( which echo )" # Define functions expandword() { @@ -33,7 +35,7 @@ expandword() { # if file, add it # if directory, expand it # if tarball, extract it and operate on the directory like normal - local _word="$( echo "${@}" | sed -e 'sF\/\/F\/Fg;' )" + local _word="$( ${echobin} "${@}" | sed -e 'sF\/\/F\/Fg;' )" if test -d "${_word}"; then # loop through all files in the directory @@ -48,22 +50,22 @@ expandword() { *.tgz|*.tar.gz) # extract it and expand the temporary directory _tmpdir="$( mktemp -d )"; alltempdirs="${alltempdirs} ${_tmpdir}" - echo "tmpdir ${_tmpdir}" + ${echobin} "tmpdir ${_tmpdir}" tar -zx -C "${_tmpdir}" -f "${_word}" expandword "${_tmpdir}" ;; *.zip) _tmpdir="$( mktemp -d )"; alltempdirs="${alltempdirs} ${_tmpdir}" - echo "tmpdir ${_tmpdir}" - echo "7za e -w${_tmpdir} ${_word}" + ${echobin} "tmpdir ${_tmpdir}" + ${echobin} "7za e -w${_tmpdir} ${_word}" ( cd "${_tmpdir}" ; 7za e "${_word}" ; ) expandword "${_tmpdir}" ;; *) # assume it is readable and add it to list of files to open - echo "File:1 ${_word}" + ${echobin} "File:1 ${_word}" thisfile="$( getwinepath "${_word}" )" - echo "File:2 ${thisfile}" + ${echobin} "File:2 ${thisfile}" irfanfiles="${irfanfiles} '${thisfile}'" ;; esac @@ -86,11 +88,11 @@ for word in "${@}"; do expandword "${word}" done -irfanfiles="$( echo "${irfanfiles## }" | sed -r -e 's/\r//g;' )" +irfanfiles="$( ${echobin} "${irfanfiles## }" | sed -r -e 's/\r//g;' )" # run wine cd $WINEPREFIX -echo wine "${IV_EXEC_PATH}" ${irfanargs} ${irfanfiles} +${echobin} wine "${IV_EXEC_PATH}" ${irfanargs} ${irfanfiles} eval wine \"${IV_EXEC_PATH}\" "${irfanargs}" "${irfanfiles}" & wait %1 |