diff options
author | B Stack <bgstack15@gmail.com> | 2020-07-22 15:27:46 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-07-22 15:27:46 +0000 |
commit | 00a6024b2ec8573a3ed39704e859fb9a47db4ceb (patch) | |
tree | 10788e02dd1b5cf0e110b850992a9697aef7eda0 /irfanview/debian/bin | |
parent | fix #23 add new settings to browser prefs (diff) | |
parent | improve i-common in dpkg (diff) | |
download | stackrpms-00a6024b2ec8573a3ed39704e859fb9a47db4ceb.tar.gz stackrpms-00a6024b2ec8573a3ed39704e859fb9a47db4ceb.tar.bz2 stackrpms-00a6024b2ec8573a3ed39704e859fb9a47db4ceb.zip |
Merge branch 'irfanview-bump' into 'master'
Irfanview fix invocation again
Closes #21
See merge request bgstack15/stackrpms!168
Diffstat (limited to 'irfanview/debian/bin')
-rwxr-xr-x | irfanview/debian/bin/irfanview-common | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/irfanview/debian/bin/irfanview-common b/irfanview/debian/bin/irfanview-common index 9c32c98..9dcb4b0 100755 --- a/irfanview/debian/bin/irfanview-common +++ b/irfanview/debian/bin/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 |