Ticket #2851: fixes of ext.d scripts:

* cleanup of undefined variables;
  * use proper variables instead of udefine ones.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-07-21 15:21:54 +04:00
parent 488c3f3500
commit d099c36a98
3 changed files with 5 additions and 8 deletions

View File

@ -8,7 +8,6 @@ filetype=$2
do_view_action() {
filetype=$1
filename=$2
case "${filetype}" in
iso9660)

View File

@ -9,7 +9,6 @@ filetype=$2
do_view_action() {
filetype=$1
filename=$2
case "${filetype}" in
trpm)
@ -24,7 +23,7 @@ do_view_action() {
$RPM -qivlp --scripts "${MC_EXT_FILENAME}"
;;
deb)
dpkg-deb -I "${filename}" && echo && dpkg-deb -c "${MC_EXT_FILENAME}"
dpkg-deb -I "${MC_EXT_FILENAME}" && echo && dpkg-deb -c "${MC_EXT_FILENAME}"
;;
debd)
dpkg -s `echo "${MC_EXT_BASENAME}" | sed 's/\([0-9a-z.-]*\).*/\1/'`

View File

@ -33,7 +33,6 @@ get_unpacker() {
do_view_action() {
filetype=$1
pager=$2
unpacker=`get_unpacker ${filetype}`
@ -60,11 +59,11 @@ do_view_action() {
man.gz|man.bz|man.bz2|man.lzma|man.xz)
case "${MC_EXT_CURRENTDIR}"/"${MC_EXT_FILENAME}" in
*/log/*|*/logs/*)
${unpacker} %f
${unpacker} "${MC_EXT_FILENAME}"
;;
*)
${unpacker} ${filename} | nroff @MAN_FLAGS@ @MANDOC@
;;
${unpacker} "${MC_EXT_FILENAME}" | nroff @MAN_FLAGS@ @MANDOC@
;;
esac
;;
*)
@ -122,7 +121,7 @@ do_open_action() {
case "${action}" in
view)
do_view_action "${filetype}" "${pager}"
do_view_action "${filetype}"
;;
open)
xdg-open "${MC_EXT_FILENAME}" 2>/dev/null || \