diff options
Diffstat (limited to '')
-rw-r--r-- | misc/ext.d/Makefile.am | 29 | ||||
-rw-r--r-- | misc/ext.d/Makefile.in | 684 | ||||
-rwxr-xr-x | misc/ext.d/archive.sh | 204 | ||||
-rw-r--r-- | misc/ext.d/doc.sh.in | 218 | ||||
-rwxr-xr-x | misc/ext.d/image.sh | 67 | ||||
-rw-r--r-- | misc/ext.d/misc.sh.in | 104 | ||||
-rwxr-xr-x | misc/ext.d/package.sh | 59 | ||||
-rwxr-xr-x | misc/ext.d/sound.sh | 106 | ||||
-rw-r--r-- | misc/ext.d/text.sh.in | 152 | ||||
-rwxr-xr-x | misc/ext.d/video.sh | 61 | ||||
-rw-r--r-- | misc/ext.d/web.sh.in | 56 |
11 files changed, 1740 insertions, 0 deletions
diff --git a/misc/ext.d/Makefile.am b/misc/ext.d/Makefile.am new file mode 100644 index 0000000..f92bb07 --- /dev/null +++ b/misc/ext.d/Makefile.am @@ -0,0 +1,29 @@ +extdir = $(EXTHELPERSDIR) + +SCRIPTS_IN = \ + doc.sh.in \ + misc.sh.in \ + text.sh.in \ + web.sh.in + +SCRIPTS_OUT = \ + doc.sh \ + misc.sh \ + text.sh \ + web.sh + +SCRIPTS_UNTOUCHED = \ + archive.sh \ + image.sh \ + package.sh \ + sound.sh \ + video.sh + +ext_SCRIPTS = \ + $(SCRIPTS_UNTOUCHED) \ + $(SCRIPTS_OUT) + +EXTRA_DIST = \ + $(SCRIPTS_UNTOUCHED) \ + $(SCRIPTS_IN) + diff --git a/misc/ext.d/Makefile.in b/misc/ext.d/Makefile.in new file mode 100644 index 0000000..61fc57a --- /dev/null +++ b/misc/ext.d/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.16.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2021 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = misc/ext.d +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/m4.include/gnulib/mode_t.m4 \ + $(top_srcdir)/m4.include/gnulib/stat-size.m4 \ + $(top_srcdir)/m4.include/gnulib/fstypename.m4 \ + $(top_srcdir)/m4.include/gnulib/fsusage.m4 \ + $(top_srcdir)/m4.include/gnulib/mountlist.m4 \ + $(top_srcdir)/m4.include/gnulib/windows-stat-inodes.m4 \ + $(top_srcdir)/m4.include/gnulib/sys_types_h.m4 \ + $(top_srcdir)/m4.include/ax_path_lib_pcre.m4 \ + $(top_srcdir)/m4.include/ax_check_pcre2.m4 \ + $(top_srcdir)/m4.include/dx_doxygen.m4 \ + $(top_srcdir)/m4.include/ax_require_defined.m4 \ + $(top_srcdir)/m4.include/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_flag.m4 \ + $(top_srcdir)/m4.include/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4.include/mc-cflags.m4 \ + $(top_srcdir)/m4.include/ax_gcc_func_attribute.m4 \ + $(top_srcdir)/m4.include/mc-check-search-type.m4 \ + $(top_srcdir)/m4.include/mc-get-fs-info.m4 \ + $(top_srcdir)/m4.include/mc-with-x.m4 \ + $(top_srcdir)/m4.include/mc-use-termcap.m4 \ + $(top_srcdir)/m4.include/mc-with-screen.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-ncurses.m4 \ + $(top_srcdir)/m4.include/mc-with-screen-slang.m4 \ + $(top_srcdir)/m4.include/mc-with-internal-edit.m4 \ + $(top_srcdir)/m4.include/mc-subshell.m4 \ + $(top_srcdir)/m4.include/mc-background.m4 \ + $(top_srcdir)/m4.include/mc-ext2fs-attr.m4 \ + $(top_srcdir)/m4.include/mc-glib.m4 \ + $(top_srcdir)/m4.include/mc-vfs.m4 \ + $(top_srcdir)/m4.include/vfs/rpc.m4 \ + $(top_srcdir)/m4.include/vfs/socket.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-extfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-ftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-sftp.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-fish.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-undelfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-tarfs.m4 \ + $(top_srcdir)/m4.include/vfs/mc-vfs-cpiofs.m4 \ + $(top_srcdir)/m4.include/mc-version.m4 \ + $(top_srcdir)/m4.include/mc-tests.m4 \ + $(top_srcdir)/m4.include/mc-i18n.m4 \ + $(top_srcdir)/m4.include/mc-assert.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = doc.sh misc.sh text.sh web.sh +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(extdir)" +SCRIPTS = $(ext_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/doc.sh.in \ + $(srcdir)/misc.sh.in $(srcdir)/text.sh.in $(srcdir)/web.sh.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +COM_ERR_CFLAGS = @COM_ERR_CFLAGS@ +COM_ERR_LIBS = @COM_ERR_LIBS@ +CP1251 = @CP1251@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOC_LINGUAS = @DOC_LINGUAS@ +DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +DX_CONFIG = @DX_CONFIG@ +DX_DOCDIR = @DX_DOCDIR@ +DX_DOT = @DX_DOT@ +DX_DOXYGEN = @DX_DOXYGEN@ +DX_DVIPS = @DX_DVIPS@ +DX_EGREP = @DX_EGREP@ +DX_ENV = @DX_ENV@ +DX_FLAG_chi = @DX_FLAG_chi@ +DX_FLAG_chm = @DX_FLAG_chm@ +DX_FLAG_doc = @DX_FLAG_doc@ +DX_FLAG_dot = @DX_FLAG_dot@ +DX_FLAG_html = @DX_FLAG_html@ +DX_FLAG_man = @DX_FLAG_man@ +DX_FLAG_pdf = @DX_FLAG_pdf@ +DX_FLAG_ps = @DX_FLAG_ps@ +DX_FLAG_rtf = @DX_FLAG_rtf@ +DX_FLAG_xml = @DX_FLAG_xml@ +DX_HHC = @DX_HHC@ +DX_LATEX = @DX_LATEX@ +DX_MAKEINDEX = @DX_MAKEINDEX@ +DX_PDFLATEX = @DX_PDFLATEX@ +DX_PERL = @DX_PERL@ +DX_PROJECT = @DX_PROJECT@ +E2P_CFLAGS = @E2P_CFLAGS@ +E2P_LIBS = @E2P_LIBS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ETAGS = @ETAGS@ +EXEEXT = @EXEEXT@ +EXT2FS_CFLAGS = @EXT2FS_CFLAGS@ +EXT2FS_LIBS = @EXT2FS_LIBS@ +EXTHELPERSDIR = @EXTHELPERSDIR@ +FGREP = @FGREP@ +FILECMD = @FILECMD@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +HAVE_FILECMD = @HAVE_FILECMD@ +HAVE_ZIPINFO = @HAVE_ZIPINFO@ +HAVE_nroff = @HAVE_nroff@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMC_RELEASE = @LIBMC_RELEASE@ +LIBMC_VERSION = @LIBMC_VERSION@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSH_CFLAGS = @LIBSSH_CFLAGS@ +LIBSSH_LIBS = @LIBSSH_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANDOC = @MANDOC@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MAN_DATE = @MAN_DATE@ +MAN_FLAGS = @MAN_FLAGS@ +MAN_VERSION = @MAN_VERSION@ +MCLIBS = @MCLIBS@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PERL = @PERL@ +PERL_FOR_BUILD = @PERL_FOR_BUILD@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POSUB = @POSUB@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLANG_CFLAGS = @SLANG_CFLAGS@ +SLANG_LIBS = @SLANG_LIBS@ +STRIP = @STRIP@ +TESTS_LDFLAGS = @TESTS_LDFLAGS@ +UNZIP = @UNZIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +X11_WWW = @X11_WWW@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +ZIP = @ZIP@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +extdir = $(EXTHELPERSDIR) +SCRIPTS_IN = \ + doc.sh.in \ + misc.sh.in \ + text.sh.in \ + web.sh.in + +SCRIPTS_OUT = \ + doc.sh \ + misc.sh \ + text.sh \ + web.sh + +SCRIPTS_UNTOUCHED = \ + archive.sh \ + image.sh \ + package.sh \ + sound.sh \ + video.sh + +ext_SCRIPTS = \ + $(SCRIPTS_UNTOUCHED) \ + $(SCRIPTS_OUT) + +EXTRA_DIST = \ + $(SCRIPTS_UNTOUCHED) \ + $(SCRIPTS_IN) + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/ext.d/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu misc/ext.d/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +doc.sh: $(top_builddir)/config.status $(srcdir)/doc.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +misc.sh: $(top_builddir)/config.status $(srcdir)/misc.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +text.sh: $(top_builddir)/config.status $(srcdir)/text.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +web.sh: $(top_builddir)/config.status $(srcdir)/web.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-extSCRIPTS: $(ext_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(ext_SCRIPTS)'; test -n "$(extdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(extdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(extdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(extdir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(extdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-extSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(ext_SCRIPTS)'; test -n "$(extdir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(extdir)'; $(am__uninstall_files_from_dir) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(extdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-extSCRIPTS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-extSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-extSCRIPTS \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-extSCRIPTS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/misc/ext.d/archive.sh b/misc/ext.d/archive.sh new file mode 100755 index 0000000..840fd47 --- /dev/null +++ b/misc/ext.d/archive.sh @@ -0,0 +1,204 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file +# $3 - pager + +action=$1 +filetype=$2 +pager=$3 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + gz) + gzip -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + bz2) + bzip2 -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + bzip) + bzip2 -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + lz) + lzip -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + lz4) + lz4 -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + lzma) + lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + xz) + xz -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + zst) + zstd -dc "${MC_EXT_FILENAME}" 2>/dev/null + ;; + tar) + tar tvvf - < "${MC_EXT_FILENAME}" + ;; + tar.gz|tar.qpr) + gzip -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.bzip) + bzip -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.bzip2) + bzip2 -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.lz) + lzip -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.lz4) + lz4 -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.lzma) + lzma -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.xz) + xz -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.zst|tzst) + zstd -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + tar.F) + freeze -dc "${MC_EXT_FILENAME}" 2>/dev/null | \ + tar tvvf - + ;; + + lha) + lha l "${MC_EXT_FILENAME}" 2>/dev/null || \ + jlha l "${MC_EXT_FILENAME}" 2>/dev/null || \ + lhasa l "${MC_EXT_FILENAME}" 2>/dev/null + ;; + arj) + arj l "${MC_EXT_FILENAME}" 2>/dev/null || \ + unarj l "${MC_EXT_FILENAME}" 2>/dev/null || \ + 7za l "${MC_EXT_FILENAME}" 2>/dev/null + ;; + cab) + cabextract -l "${MC_EXT_FILENAME}" 2> /dev/null || \ + 7za l "${MC_EXT_FILENAME}" 2>/dev/null + ;; + ha) + ha lf "${MC_EXT_FILENAME}" + ;; + rar) + rar v -c- "${MC_EXT_FILENAME}" 2>/dev/null || \ + unrar v -c- "${MC_EXT_FILENAME}" + ;; + alz) + unalz -l "${MC_EXT_FILENAME}" + ;; + cpio.z|cpio.gz) + gzip -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; + cpio.lz) + lzip -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; + cpio.lz4) + lz4 -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; + cpio.xz) + xz -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; + cpio.zst) + zstd -dc "${MC_EXT_FILENAME}" | \ + cpio -itv 2>/dev/null + ;; + cpio) + cpio -itv < "${MC_EXT_FILENAME}" 2>/dev/null + ;; + 7z) + 7za l "${MC_EXT_FILENAME}" 2>/dev/null || + 7z l "${MC_EXT_FILENAME}" + + ;; + ace) + unace l "${MC_EXT_FILENAME}" + ;; + arc) + arc l "${MC_EXT_FILENAME}" + ;; + zip) + unzip -v "${MC_EXT_FILENAME}" 2> /dev/null || \ + 7za l "${MC_EXT_FILENAME}" 2> /dev/null + ;; + zipx) + 7za l "${MC_EXT_FILENAME}" 2> /dev/null + ;; + zoo) + zoo l "${MC_EXT_FILENAME}" + ;; + wim) + wimlib-imagex info "${MC_EXT_FILENAME}" 2> /dev/null + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + pager=$2 + + case "${filetype}" in + bzip2) + bzip2 -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + bzip) + bzip -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + gz) + gz -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + lz) + lzip -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + lz4) + lz4 -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + lzma) + lzma -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + xz) + xz -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + zst) + zstd -dc "${MC_EXT_FILENAME}" | ${pager} + ;; + par2) + par2 r "${MC_EXT_FILENAME}" + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" "${pager}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/doc.sh.in b/misc/ext.d/doc.sh.in new file mode 100644 index 0000000..c296ca2 --- /dev/null +++ b/misc/ext.d/doc.sh.in @@ -0,0 +1,218 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +STAROFFICE_REGEXP='\.(sxw|sdw|stw|sxc|stc|sxi|sti|sxd|std||sxm||sxg)$' + +staroffice_console() { + filename=$1;shift + is_view=$1; shift + if [ -n "${is_view}" ]; then + is_view='-dump' + fi + + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + cd $tmp + soffice2html.pl "${filename}" + elinks ${is_view} content.html + rm -rf "$tmp" +} + +get_ooffice_executable() { + if which loffice >/dev/null 2>&1; then + echo "loffice" + elif which ooffice >/dev/null 2>&1; then + echo "ooffice" + else + echo -n + fi +} + +do_view_action() { + filetype=$1 + + case "${filetype}" in + ps) + ps2ascii "${MC_EXT_FILENAME}" + ;; + pdf) + pdftotext -layout -nopgbrk "${MC_EXT_FILENAME}" - + ;; + odt) + if [ ` echo "${MC_EXT_FILENAME}" | grep -c "${STAROFFICE_REGEXP}"` -ne 0 ]; then + staroffice_console "${MC_EXT_FILENAME}" "view" + else + odt2txt "${MC_EXT_FILENAME}" + fi + ;; + msdoc) + if which wvHtml >/dev/null 2>&1; then + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + wvHtml "${MC_EXT_FILENAME}" --targetdir="$tmp" page.html + elinks -dump "$tmp/page.html" + rm -rf "$tmp" + elif which antiword >/dev/null 2>&1; then + antiword -t "${MC_EXT_FILENAME}" + elif which catdoc >/dev/null 2>&1; then + catdoc -w "${MC_EXT_FILENAME}" + elif which word2x >/dev/null 2>&1; then + word2x -f text "${MC_EXT_FILENAME}" - + else + strings "${MC_EXT_FILENAME}" + fi + ;; + msxls) + if which xlhtml >/dev/null 2>&1; then + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + xlhtml -a "${MC_EXT_FILENAME}" > "$tmp/page.html" + elinks -dump "$tmp/page.html" + rm -rf "$tmp" + elif which xls2csv >/dev/null 2>&1; then + xls2csv "${MC_EXT_FILENAME}" + else + strings "${MC_EXT_FILENAME}" + fi + ;; + dvi) + which dvi2tty >/dev/null 2>&1 && \ + dvi2tty "${MC_EXT_FILENAME}" || \ + catdvi "${MC_EXT_FILENAME}" + ;; + djvu) + djvused -e print-pure-txt "${MC_EXT_FILENAME}" + ;; + ebook) + einfo -v "${MC_EXT_FILENAME}" + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + ps) + if [ -n "$DISPLAY" ]; then + (gv "${MC_EXT_FILENAME}" &) + else + ps2ascii "${MC_EXT_FILENAME}" | ${PAGER:-more} + fi + ;; + pdf) + if [ ! -n "$DISPLAY" ]; then + pdftotext -layout -nopgbrk "${MC_EXT_FILENAME}" - | ${PAGER:-more} + elif see > /dev/null 2>&1; then + (see "${MC_EXT_FILENAME}" &) + else + (xpdf "${MC_EXT_FILENAME}" &) + fi + #(acroread "${MC_EXT_FILENAME}" &) + #(ghostview "${MC_EXT_FILENAME}" &) + ;; + ooffice) + if [ -n "$DISPLAY" ]; then + OOFFICE=`get_ooffice_executable` + if [ -n "${OOFFICE}" ]; then + (${OOFFICE} "${MC_EXT_FILENAME}" &) + fi + else + if [ `echo "${MC_EXT_FILENAME}" | grep -c "${STAROFFICE_REGEXP}"` -ne 0 ]; then + staroffice_console "${MC_EXT_FILENAME}" + else + odt2txt "${MC_EXT_FILENAME}" | ${PAGER:-more} + fi + fi + ;; + abw) + (abiword "${MC_EXT_FILENAME}" &) + ;; + gnumeric) + (gnumeric "${MC_EXT_FILENAME}" &) + ;; + msdoc) + if [ -n "$DISPLAY" ]; then + OOFFICE=`get_ooffice_executable` + if [ -n "${OOFFICE}" ]; then + (${OOFFICE} "${MC_EXT_FILENAME}" &) + else + (abiword "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + fi + else + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + wvHtml "${MC_EXT_FILENAME}" --targetdir="$tmp" page.html -1 + elinks "$tmp/page.html" + rm -rf "$tmp" + fi + ;; + msxls) + if [ -n "$DISPLAY" ]; then + OOFFICE=`get_ooffice_executable` + if [ -n "${OOFFICE}" ]; then + (${OOFFICE} "${MC_EXT_FILENAME}" &) + else + (gnumeric "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + fi + else + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + xlhtml -a "${MC_EXT_FILENAME}" > "$tmp/page.html" + elinks "$tmp/page.html" + rm -rf "$tmp" + fi + ;; + msppt) + if [ -n "$DISPLAY" ]; then + OOFFICE=`get_ooffice_executable` + if [ -n "${OOFFICE}" ]; then + (${OOFFICE} "${MC_EXT_FILENAME}" &) + fi + else + tmp=`mktemp -d ${TMPDIR:-/tmp}/%p.XXXXXX` + ppthtml "${MC_EXT_FILENAME}" > "$tmp/page.html" + elinks "$tmp/page.html" + rm -rf "$tmp" + fi + ;; + framemaker) + fmclient -f "${MC_EXT_FILENAME}" + ;; + dvi) + if [ -n "$DISPLAY" ]; then + (xdvi "${MC_EXT_FILENAME}" &) + else + dvisvga "${MC_EXT_FILENAME}" || \ + dvi2tty "${MC_EXT_FILENAME}" | ${PAGER:-more} + fi + ;; + djvu) + djview "${MC_EXT_FILENAME}" & + ;; + comic) + cbrpager "${MC_EXT_FILENAME}" & + ;; + ebook) + lucidor "${MC_EXT_FILENAME}" >/dev/null & + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/image.sh b/misc/ext.d/image.sh new file mode 100755 index 0000000..04307e0 --- /dev/null +++ b/misc/ext.d/image.sh @@ -0,0 +1,67 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + jpeg) + identify "${MC_EXT_FILENAME}" + which exif >/dev/null 2>&1 && exif "${MC_EXT_FILENAME}" 2>/dev/null + ;; + xpm) + sxpm "${MC_EXT_FILENAME}" + ;; + *) + identify "${MC_EXT_FILENAME}" + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + xbm) + (bitmap "${MC_EXT_FILENAME}" &) + ;; + xcf) + (gimp "${MC_EXT_FILENAME}" &) + ;; + svg) + (inkscape "${MC_EXT_FILENAME}" &) + ;; + *) + if [ -n "$DISPLAY" ]; then + if which geeqie >/dev/null 2>&1; then + (geeqie "${MC_EXT_FILENAME}" &) + else + (gqview "${MC_EXT_FILENAME}" &) + fi + elif which see >/dev/null 2>&1; then + (see "${MC_EXT_FILENAME}" &) + else + (zgv "${MC_EXT_FILENAME}" &) + fi + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/misc.sh.in b/misc/ext.d/misc.sh.in new file mode 100644 index 0000000..822cf2b --- /dev/null +++ b/misc/ext.d/misc.sh.in @@ -0,0 +1,104 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + iso9660) + if which isoinfo > /dev/null 2>&1; then + isoinfo -d -i "${MC_EXT_FILENAME}" && isoinfo -l -R -J -i "${MC_EXT_FILENAME}" + else + 7za l "${MC_EXT_FILENAME}" + fi + ;; + cat) + cat "${MC_EXT_FILENAME}" 2>/dev/null + ;; + ar) + file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}" + ;; + lib) + gplib -t "${MC_EXT_FILENAME}" | \ + @PERL@ -e 'while (<>) { @a=split /[\s\t]+/, $_; printf ("%-30s | %10d | %s.%s.%02d | %s\n", $a[0], ($a[1]*1),$a[7], lc($a[4]), $a[5], $a[6]);}' + ;; + so) + file "${MC_EXT_FILENAME}" && nm -C -D "${MC_EXT_FILENAME}" + ;; + elf) + file "${MC_EXT_FILENAME}" && nm -C "${MC_EXT_FILENAME}" + ;; + dylib) + file "${MC_EXT_FILENAME}" && nm -n "${MC_EXT_FILENAME}" + ;; + dbf) + dbview -b "${MC_EXT_FILENAME}" + ;; + sqlite) + sqlite3 "file:${MC_EXT_FILENAME}?immutable=1" .dump + ;; + mo) + msgunfmt "${MC_EXT_FILENAME}" || \ + cat "${MC_EXT_FILENAME}" + ;; + lyx) + lyxcat "${MC_EXT_FILENAME}" + ;; + torrent) + ctorrent -x "${MC_EXT_FILENAME}" 2>/dev/null + ;; + javaclass) + jad -p "${MC_EXT_FILENAME}" 2>/dev/null || \ + (file -b "${MC_EXT_FILENAME}"; javap -private "${MC_EXT_FILENAME}" 2>/dev/null) + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + dbf) + dbview "${MC_EXT_FILENAME}" + ;; + sqlite) + sqlite3 "${MC_EXT_FILENAME}" + ;; + glade) + if which glade-3 >/dev/null 2>&1; then + (glade-3 "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + (glade-2 "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + fi + ;; + po) + (poedit "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + ;; + lyx) + lyx "${MC_EXT_FILENAME}" + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/package.sh b/misc/ext.d/package.sh new file mode 100755 index 0000000..fc1aa1f --- /dev/null +++ b/misc/ext.d/package.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + trpm) + rpm -qivl --scripts `basename "${MC_EXT_BASENAME}" .trpm` + ;; + src.rpm|rpm) + if rpm --nosignature --version >/dev/null 2>&1; then + RPM="rpm --nosignature" + else + RPM="rpm" + fi + $RPM -qivlp --scripts "${MC_EXT_FILENAME}" + ;; + deb) + 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/'` + ;; + deba) + apt-cache show `echo "${MC_EXT_BASENAME}" | sed 's/\([0-9a-z.-]*\).*/\1/'` + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/sound.sh b/misc/ext.d/sound.sh new file mode 100755 index 0000000..60a3cdd --- /dev/null +++ b/misc/ext.d/sound.sh @@ -0,0 +1,106 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + common) + mediainfo "${MC_EXT_FILENAME}" + ;; + + mp3) + mpg123 -vtn1 "${MC_EXT_FILENAME}" 2>&1 | \ + sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p' + ;; + ogg) + ogginfo "${MC_EXT_FILENAME}" + ;; + opus) + opusinfo "${MC_EXT_FILENAME}" + ;; + wma) + mplayer -quiet -slave -frames 0 -vo null -ao null -identify "${MC_EXT_FILENAME}" 2>/dev/null | \ + tail +13 || file "${MC_EXT_FILENAME}" + ;; + *) + cat "${MC_EXT_FILENAME}" + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + common) + if [ -n "$DISPLAY" ]; then + (audacious "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + play "${MC_EXT_FILENAME}" + fi + ;; + mod) + mikmod "${MC_EXT_FILENAME}" + #tracker "${MC_EXT_FILENAME}" + ;; + wav22) + vplay -s 22 "${MC_EXT_FILENAME}" + ;; + mp3) + if [ -n "$DISPLAY" ]; then + (audacious "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + mpg123 "${MC_EXT_FILENAME}" + fi + ;; + ogg) + if [ -n "$DISPLAY" ]; then + (audacious "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + ogg123 "${MC_EXT_FILENAME}" + fi + ;; + opus) + if [ -n "$DISPLAY" ]; then + (audacious "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + play "${MC_EXT_FILENAME}" + fi + ;; + midi) + timidity "${MC_EXT_FILENAME}" + ;; + wma) + mplayer -vo null "${MC_EXT_FILENAME}" + ;; + playlist) + if [ -n "$DISPLAY" ]; then + (audacious -p "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + mplayer -vo null -playlist "${MC_EXT_FILENAME}" + fi + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/text.sh.in b/misc/ext.d/text.sh.in new file mode 100644 index 0000000..2bd6ca0 --- /dev/null +++ b/misc/ext.d/text.sh.in @@ -0,0 +1,152 @@ +#!/bin/sh + +# $1 - action +# $2 - type of archive +# $3 - pager + +action=$1 +filetype=$2 +pager=$3 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +get_unpacker() { + filetype=$1 + case "${filetype}" in + man.gz) + unpacker="gzip -dc" + ;; + man.bz) + unpacker="bzip -dc" + ;; + man.bz2) + unpacker="bzip2 -dc" + ;; + man.lz) + unpacker="lzip -dc" + ;; + man.lz4) + unpacker="lz4 -dc" + ;; + man.lzma) + unpacker="lzma -dc" + ;; + man.xz) + unpacker="xz -dc" + ;; + man.zst) + unpacker="zstd -dc" + ;; + esac + echo ${unpacker} +} + + +do_view_action() { + filetype=$1 + + unpacker=`get_unpacker ${filetype}` + + case "${filetype}" in + man) + case "${MC_EXT_FILENAME}" in + */log/*|*/logs/*) + cat "${MC_EXT_FILENAME}" + ;; + *) + MANROFFOPT=-c MAN_KEEP_FORMATTING=1 man -P cat "${MC_EXT_FILENAME}" + ;; + esac + ;; + pod) + pod2man "${MC_EXT_FILENAME}" | nroff @MAN_FLAGS@ @MANDOC@ + ;; + nroff.me) + nroff @MAN_FLAGS@ -me "${MC_EXT_FILENAME}" + ;; + nroff.ms) + nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" + ;; + man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) + case "${MC_EXT_FILENAME}" in + */log/*|*/logs/*) + ${unpacker} "${MC_EXT_FILENAME}" + ;; + *) + # "man" takes care of uncompressing. + # This way the stdin is left intact so the correct width is used. + MANROFFOPT=-c MAN_KEEP_FORMATTING=1 man -P cat "${MC_EXT_FILENAME}" + ;; + esac + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + pager=$2 + + unpacker=`get_unpacker ${filetype}` + + case "${filetype}" in + info) + info -f "${MC_EXT_FILENAME}" + ;; + man) + case "${MC_EXT_FILENAME}" in + */log/*|*/logs/*) + cat "${MC_EXT_FILENAME}" + ;; + *) + { zsoelim "${MC_EXT_FILENAME}" 2>/dev/null || cat "${MC_EXT_FILENAME}"; } | \ + nroff @MAN_FLAGS@ @MANDOC@ + ;; + esac | ${pager} + ;; + pod) + pod2man "${MC_EXT_FILENAME}" | nroff @MAN_FLAGS@ @MANDOC@ | ${pager} + ;; + nroff.me) + nroff @MAN_FLAGS@ -me "${MC_EXT_FILENAME}" | ${pager} + ;; + nroff.ms) + nroff @MAN_FLAGS@ -ms "${MC_EXT_FILENAME}" | ${pager} + ;; + man.gz|man.bz|man.bz2|man.lz|man.lz4|man.lzma|man.xz|man.zst) + case "${MC_EXT_FILENAME}" in + */log/*|*/logs/*) + ${unpacker} "${MC_EXT_FILENAME}" + ;; + *) + ${unpacker} "${MC_EXT_FILENAME}" | nroff @MAN_FLAGS@ @MANDOC@ + ;; + esac | ${pager} + ;; + chm) + if [ -n "$DISPLAY" ]; then + which kchmviewer > /dev/null 2>&1 \ + && (kchmviewer "${MC_EXT_FILENAME}" &) \ + || (xchm "${MC_EXT_FILENAME}" &) + else + chm_http "${MC_EXT_FILENAME}" & elinks http://localhost:8080/index.html + kill -INT %1 + fi + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" "${pager}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/video.sh b/misc/ext.d/video.sh new file mode 100755 index 0000000..9cba210 --- /dev/null +++ b/misc/ext.d/video.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + *) + if which mplayer >/dev/null 2>&1; then + mplayer -identify -vo null -ao null -frames 0 "${MC_EXT_FILENAME}" 2>&1 | \ + sed -n 's/^ID_//p' + elif which mpv_identify.sh >/dev/null 2>&1; then + mpv_identify.sh "${MC_EXT_FILENAME}" + else + echo "Please install either mplayer or mpv to get information for this file" + fi + ;; + esac +} + +do_open_action() { + filetype=$1 + + if which mpv >/dev/null 2>&1; then + PLAYER=mpv + elif which mplayer >/dev/null 2>&1; then + PLAYER=mplayer + else + echo "Please install either mplayer or mpv to play this file" + return + fi + + case "${filetype}" in + *) + if [ -n "$DISPLAY" ]; then + ($PLAYER "${MC_EXT_FILENAME}" >/dev/null 2>&1 &) + else + $PLAYER -vo null "${MC_EXT_FILENAME}" + fi + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac diff --git a/misc/ext.d/web.sh.in b/misc/ext.d/web.sh.in new file mode 100644 index 0000000..17d7e63 --- /dev/null +++ b/misc/ext.d/web.sh.in @@ -0,0 +1,56 @@ +#!/bin/sh + +# $1 - action +# $2 - type of file + +action=$1 +filetype=$2 + +[ -n "${MC_XDG_OPEN}" ] || MC_XDG_OPEN="xdg-open" + +do_view_action() { + filetype=$1 + + case "${filetype}" in + html) + links -dump "${MC_EXT_FILENAME}" 2>/dev/null || \ + w3m -dump "${MC_EXT_FILENAME}" 2>/dev/null || \ + lynx -dump -force_html "${MC_EXT_FILENAME}" 2>/dev/null || + cat "${MC_EXT_FILENAME}" + ;; + *) + ;; + esac +} + +do_open_action() { + filetype=$1 + + case "${filetype}" in + html) + (if [ -n "@X11_WWW@" -a -n "$DISPLAY" ]; then + (@X11_WWW@ file://"${MC_EXT_CURRENTDIR}"/"${MC_EXT_BASENAME}" &) 1>&2 + else + elinks "${MC_EXT_FILENAME}" || \ + links "${MC_EXT_FILENAME}" || \ + lynx -force_html "${MC_EXT_FILENAME}" || \ + ${PAGER:-more} "${MC_EXT_FILENAME}" + fi) 2>/dev/null + ;; + *) + ;; + esac +} + +case "${action}" in +view) + do_view_action "${filetype}" + ;; +open) + ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ + do_open_action "${filetype}" + ;; +*) + ;; +esac + |