Skip to content

zshrc: simple-extract() use unp for all archive types #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crpb
Copy link
Contributor

@crpb crpb commented Apr 12, 2025

Keep simple-extract() as it has the wget magic
Use unp which is in GRML_SMALL+FULL

closes #178
closes #177

@crpb
Copy link
Contributor Author

crpb commented Apr 12, 2025

Looks good to me...
cb@obelix ~crpb/grml-etc-core (git)-[simple-extract] % cdt
/tmp/tmp.oewBIdGIiQ
cb@obelix /tmp/tmp.oewBIdGIiQ % simple-extract https://github.com/grml/grml-etc-core/archive/refs/heads/master.zip
Downloading and Extracting 'https://github.com/grml/grml-etc-core/archive/refs/heads/master.zip' ...
Archive:  /tmp/zshGwnXkL
b8f245bef11c1e7abd7bcfbba3f62b5eea614f79
   creating: grml-etc-core-master/
   creating: grml-etc-core-master/.github/
 extracting: grml-etc-core-master/.github/FUNDING.yml
   creating: grml-etc-core-master/.github/workflows/
  inflating: grml-etc-core-master/.github/workflows/test-build.yml
  inflating: grml-etc-core-master/.gitignore
  inflating: grml-etc-core-master/README.md
   creating: grml-etc-core-master/debian/
  inflating: grml-etc-core-master/debian/NEWS
  inflating: grml-etc-core-master/debian/changelog
 extracting: grml-etc-core-master/debian/conffiles
  inflating: grml-etc-core-master/debian/control
  inflating: grml-etc-core-master/debian/copyright
  inflating: grml-etc-core-master/debian/gbp.conf
  inflating: grml-etc-core-master/debian/grml-etc-core.lintian-overrides
  inflating: grml-etc-core-master/debian/install
 extracting: grml-etc-core-master/debian/manpages
  inflating: grml-etc-core-master/debian/postrm
  inflating: grml-etc-core-master/debian/preinst
  inflating: grml-etc-core-master/debian/rules
   creating: grml-etc-core-master/debian/source/
 extracting: grml-etc-core-master/debian/source/format
   creating: grml-etc-core-master/doc/
  inflating: grml-etc-core-master/doc/Makefile
  inflating: grml-etc-core-master/doc/grmlzshrc.adoc
   creating: grml-etc-core-master/etc/
   creating: grml-etc-core-master/etc/apt/
   creating: grml-etc-core-master/etc/apt/grml/
  inflating: grml-etc-core-master/etc/apt/grml/listbugs
   creating: grml-etc-core-master/etc/grml/
  inflating: grml-etc-core-master/etc/grml/lsb-functions
  inflating: grml-etc-core-master/etc/grml/screen_multisession
  inflating: grml-etc-core-master/etc/grml/screenrc
  inflating: grml-etc-core-master/etc/grml/screenrc_acpi
  inflating: grml-etc-core-master/etc/grml/screenrc_generic
  inflating: grml-etc-core-master/etc/grml/script-functions
  inflating: grml-etc-core-master/etc/grml/sysexits-sh
  inflating: grml-etc-core-master/etc/grml_colors
  inflating: grml-etc-core-master/etc/grml_nocolors
  inflating: grml-etc-core-master/etc/minimal-shellrc
   creating: grml-etc-core-master/etc/network/
  inflating: grml-etc-core-master/etc/network/interfaces.examples
   creating: grml-etc-core-master/etc/skel/
  inflating: grml-etc-core-master/etc/skel/.emacs
  inflating: grml-etc-core-master/etc/skel/.gitconfig
  inflating: grml-etc-core-master/etc/skel/.hgrc
   creating: grml-etc-core-master/etc/skel/.vim/
   creating: grml-etc-core-master/etc/skel/.vim/ftplugin/
  inflating: grml-etc-core-master/etc/skel/.vim/ftplugin/c.vim
  inflating: grml-etc-core-master/etc/skel/.vim/klammerpaare.vim
   creating: grml-etc-core-master/etc/skel/.vim/plugin/
  inflating: grml-etc-core-master/etc/skel/.vim/plugin/DirDiff.vim
 extracting: grml-etc-core-master/etc/skel/.vim/spellfile.add
  inflating: grml-etc-core-master/etc/skel/.zshrc
  inflating: grml-etc-core-master/etc/tmux.conf
   creating: grml-etc-core-master/etc/vim/
  inflating: grml-etc-core-master/etc/vim/vimrc
   creating: grml-etc-core-master/etc/zsh/
  inflating: grml-etc-core-master/etc/zsh/keephack
  inflating: grml-etc-core-master/etc/zsh/zlogin
  inflating: grml-etc-core-master/etc/zsh/zprofile
  inflating: grml-etc-core-master/etc/zsh/zshenv
  inflating: grml-etc-core-master/etc/zsh/zshrc
   creating: grml-etc-core-master/usr_share_grml/
   creating: grml-etc-core-master/usr_share_grml/zsh/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/_debian_rules
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-lang
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-tips
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-wallpaper
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_fbset
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_iwconfig
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_hl_complete
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_lookup
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_cpan
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_msgid
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_patchtrack
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_pts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_dsc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_filewatcher
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_freshmeat
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_google
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_grml_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_koders
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_leo
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_letssingit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_rfc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_sourceforge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_usenet
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_wikipedia
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_zsh_mla
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_browser
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_context
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_encode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_guard
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_help
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_hook
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_parseopts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_query_handler
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/lookupinit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/exirename
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/grml-wallpaper
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/hl
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/ipv6-tunnel
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/linenr
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/lsdisk
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/minimal-shell
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/purge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/readme
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/urldecode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/weather
cb@obelix /tmp/tmp.oewBIdGIiQ % ls
grml-etc-core-master
cb@obelix /tmp/tmp.oewBIdGIiQ % rm -rf grml-etc-core-master
cb@obelix /tmp/tmp.oewBIdGIiQ % wget -q https://github.com/grml/grml-etc-core/archive/refs/heads/master.zip
cb@obelix /tmp/tmp.oewBIdGIiQ % simple-extract master.zip
Archive:  master.zip
b8f245bef11c1e7abd7bcfbba3f62b5eea614f79
   creating: grml-etc-core-master/
   creating: grml-etc-core-master/.github/
 extracting: grml-etc-core-master/.github/FUNDING.yml
   creating: grml-etc-core-master/.github/workflows/
  inflating: grml-etc-core-master/.github/workflows/test-build.yml
  inflating: grml-etc-core-master/.gitignore
  inflating: grml-etc-core-master/README.md
   creating: grml-etc-core-master/debian/
  inflating: grml-etc-core-master/debian/NEWS
  inflating: grml-etc-core-master/debian/changelog
 extracting: grml-etc-core-master/debian/conffiles
  inflating: grml-etc-core-master/debian/control
  inflating: grml-etc-core-master/debian/copyright
  inflating: grml-etc-core-master/debian/gbp.conf
  inflating: grml-etc-core-master/debian/grml-etc-core.lintian-overrides
  inflating: grml-etc-core-master/debian/install
 extracting: grml-etc-core-master/debian/manpages
  inflating: grml-etc-core-master/debian/postrm
  inflating: grml-etc-core-master/debian/preinst
  inflating: grml-etc-core-master/debian/rules
   creating: grml-etc-core-master/debian/source/
 extracting: grml-etc-core-master/debian/source/format
   creating: grml-etc-core-master/doc/
  inflating: grml-etc-core-master/doc/Makefile
  inflating: grml-etc-core-master/doc/grmlzshrc.adoc
   creating: grml-etc-core-master/etc/
   creating: grml-etc-core-master/etc/apt/
   creating: grml-etc-core-master/etc/apt/grml/
  inflating: grml-etc-core-master/etc/apt/grml/listbugs
   creating: grml-etc-core-master/etc/grml/
  inflating: grml-etc-core-master/etc/grml/lsb-functions
  inflating: grml-etc-core-master/etc/grml/screen_multisession
  inflating: grml-etc-core-master/etc/grml/screenrc
  inflating: grml-etc-core-master/etc/grml/screenrc_acpi
  inflating: grml-etc-core-master/etc/grml/screenrc_generic
  inflating: grml-etc-core-master/etc/grml/script-functions
  inflating: grml-etc-core-master/etc/grml/sysexits-sh
  inflating: grml-etc-core-master/etc/grml_colors
  inflating: grml-etc-core-master/etc/grml_nocolors
  inflating: grml-etc-core-master/etc/minimal-shellrc
   creating: grml-etc-core-master/etc/network/
  inflating: grml-etc-core-master/etc/network/interfaces.examples
   creating: grml-etc-core-master/etc/skel/
  inflating: grml-etc-core-master/etc/skel/.emacs
  inflating: grml-etc-core-master/etc/skel/.gitconfig
  inflating: grml-etc-core-master/etc/skel/.hgrc
   creating: grml-etc-core-master/etc/skel/.vim/
   creating: grml-etc-core-master/etc/skel/.vim/ftplugin/
  inflating: grml-etc-core-master/etc/skel/.vim/ftplugin/c.vim
  inflating: grml-etc-core-master/etc/skel/.vim/klammerpaare.vim
   creating: grml-etc-core-master/etc/skel/.vim/plugin/
  inflating: grml-etc-core-master/etc/skel/.vim/plugin/DirDiff.vim
 extracting: grml-etc-core-master/etc/skel/.vim/spellfile.add
  inflating: grml-etc-core-master/etc/skel/.zshrc
  inflating: grml-etc-core-master/etc/tmux.conf
   creating: grml-etc-core-master/etc/vim/
  inflating: grml-etc-core-master/etc/vim/vimrc
   creating: grml-etc-core-master/etc/zsh/
  inflating: grml-etc-core-master/etc/zsh/keephack
  inflating: grml-etc-core-master/etc/zsh/zlogin
  inflating: grml-etc-core-master/etc/zsh/zprofile
  inflating: grml-etc-core-master/etc/zsh/zshenv
  inflating: grml-etc-core-master/etc/zsh/zshrc
   creating: grml-etc-core-master/usr_share_grml/
   creating: grml-etc-core-master/usr_share_grml/zsh/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/_debian_rules
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-lang
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-tips
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-wallpaper
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_fbset
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_iwconfig
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_hl_complete
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_lookup
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_cpan
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_msgid
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_patchtrack
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_pts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_dsc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_filewatcher
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_freshmeat
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_google
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_grml_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_koders
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_leo
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_letssingit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_rfc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_sourceforge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_usenet
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_wikipedia
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_zsh_mla
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_browser
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_context
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_encode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_guard
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_help
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_hook
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_parseopts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_query_handler
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/lookupinit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/exirename
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/grml-wallpaper
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/hl
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/ipv6-tunnel
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/linenr
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/lsdisk
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/minimal-shell
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/purge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/readme
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/urldecode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/weather
cb@obelix /tmp/tmp.oewBIdGIiQ % ls
grml-etc-core-master  master.zip
cb@obelix /tmp/tmp.oewBIdGIiQ % rm -rf grml-etc-core-master
cb@obelix /tmp/tmp.oewBIdGIiQ % simple-extract -d master.zip
Archive:  master.zip
b8f245bef11c1e7abd7bcfbba3f62b5eea614f79
   creating: grml-etc-core-master/
   creating: grml-etc-core-master/.github/
 extracting: grml-etc-core-master/.github/FUNDING.yml
   creating: grml-etc-core-master/.github/workflows/
  inflating: grml-etc-core-master/.github/workflows/test-build.yml
  inflating: grml-etc-core-master/.gitignore
  inflating: grml-etc-core-master/README.md
   creating: grml-etc-core-master/debian/
  inflating: grml-etc-core-master/debian/NEWS
  inflating: grml-etc-core-master/debian/changelog
 extracting: grml-etc-core-master/debian/conffiles
  inflating: grml-etc-core-master/debian/control
  inflating: grml-etc-core-master/debian/copyright
  inflating: grml-etc-core-master/debian/gbp.conf
  inflating: grml-etc-core-master/debian/grml-etc-core.lintian-overrides
  inflating: grml-etc-core-master/debian/install
 extracting: grml-etc-core-master/debian/manpages
  inflating: grml-etc-core-master/debian/postrm
  inflating: grml-etc-core-master/debian/preinst
  inflating: grml-etc-core-master/debian/rules
   creating: grml-etc-core-master/debian/source/
 extracting: grml-etc-core-master/debian/source/format
   creating: grml-etc-core-master/doc/
  inflating: grml-etc-core-master/doc/Makefile
  inflating: grml-etc-core-master/doc/grmlzshrc.adoc
   creating: grml-etc-core-master/etc/
   creating: grml-etc-core-master/etc/apt/
   creating: grml-etc-core-master/etc/apt/grml/
  inflating: grml-etc-core-master/etc/apt/grml/listbugs
   creating: grml-etc-core-master/etc/grml/
  inflating: grml-etc-core-master/etc/grml/lsb-functions
  inflating: grml-etc-core-master/etc/grml/screen_multisession
  inflating: grml-etc-core-master/etc/grml/screenrc
  inflating: grml-etc-core-master/etc/grml/screenrc_acpi
  inflating: grml-etc-core-master/etc/grml/screenrc_generic
  inflating: grml-etc-core-master/etc/grml/script-functions
  inflating: grml-etc-core-master/etc/grml/sysexits-sh
  inflating: grml-etc-core-master/etc/grml_colors
  inflating: grml-etc-core-master/etc/grml_nocolors
  inflating: grml-etc-core-master/etc/minimal-shellrc
   creating: grml-etc-core-master/etc/network/
  inflating: grml-etc-core-master/etc/network/interfaces.examples
   creating: grml-etc-core-master/etc/skel/
  inflating: grml-etc-core-master/etc/skel/.emacs
  inflating: grml-etc-core-master/etc/skel/.gitconfig
  inflating: grml-etc-core-master/etc/skel/.hgrc
   creating: grml-etc-core-master/etc/skel/.vim/
   creating: grml-etc-core-master/etc/skel/.vim/ftplugin/
  inflating: grml-etc-core-master/etc/skel/.vim/ftplugin/c.vim
  inflating: grml-etc-core-master/etc/skel/.vim/klammerpaare.vim
   creating: grml-etc-core-master/etc/skel/.vim/plugin/
  inflating: grml-etc-core-master/etc/skel/.vim/plugin/DirDiff.vim
 extracting: grml-etc-core-master/etc/skel/.vim/spellfile.add
  inflating: grml-etc-core-master/etc/skel/.zshrc
  inflating: grml-etc-core-master/etc/tmux.conf
   creating: grml-etc-core-master/etc/vim/
  inflating: grml-etc-core-master/etc/vim/vimrc
   creating: grml-etc-core-master/etc/zsh/
  inflating: grml-etc-core-master/etc/zsh/keephack
  inflating: grml-etc-core-master/etc/zsh/zlogin
  inflating: grml-etc-core-master/etc/zsh/zprofile
  inflating: grml-etc-core-master/etc/zsh/zshenv
  inflating: grml-etc-core-master/etc/zsh/zshrc
   creating: grml-etc-core-master/usr_share_grml/
   creating: grml-etc-core-master/usr_share_grml/zsh/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/_debian_rules
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-lang
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-tips
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-wallpaper
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_fbset
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_iwconfig
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_hl_complete
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_lookup
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_cpan
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_msgid
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_patchtrack
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_pts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_dsc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_filewatcher
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_freshmeat
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_google
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_grml_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_koders
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_leo
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_letssingit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_rfc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_sourceforge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_usenet
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_wikipedia
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_zsh_mla
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_browser
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_context
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_encode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_guard
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_help
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_hook
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_parseopts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_query_handler
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/lookupinit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/exirename
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/grml-wallpaper
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/hl
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/ipv6-tunnel
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/linenr
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/lsdisk
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/minimal-shell
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/purge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/readme
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/urldecode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/weather
cb@obelix /tmp/tmp.oewBIdGIiQ % ls
grml-etc-core-master
cb@obelix /tmp/tmp.oewBIdGIiQ % whence -vf simple-extract
simple-extract () {
        emulate -L zsh
        setopt extended_glob noclobber
        local ARCHIVE DELETE_ORIGINAL DECOMP_CMD WGET_CMD
        local RC=0
        DECOMP_CMD="unp"
        USES_STDIN=false
        USES_STDOUT=false
        zparseopts -D -E "d=DELETE_ORIGINAL"
        for ARCHIVE in "${@}"
        do
                if ! check_com ${DECOMP_CMD[(w)1]}
                then
                        echo "ERROR: ${DECOMP_CMD[(w)1]} not installed." >&2
                        RC=$((RC+2))
                        continue
                fi
                GZTARGET="${ARCHIVE:t:r}"
                if [[ -f $ARCHIVE ]]
                then
                        ${=DECOMP_CMD} "$ARCHIVE"
                        [[ $? -eq 0 && -n "$DELETE_ORIGINAL" ]] && rm -f "$ARCHIVE"
                elif [[ "$ARCHIVE" == (#s)(https|http|ftp)://* ]]
                then
                        if check_com curl
                        then
                                WGET_CMD="curl -L -s -o -"
                        elif check_com wget
                        then
                                WGET_CMD="wget -q -O -"
                        elif check_com fetch
                        then
                                WGET_CMD="fetch -q -o -"
                        else
                                print "ERROR: neither wget, curl nor fetch is installed" >&2
                                RC=$((RC+4))
                                continue
                        fi
                        print "Downloading and Extracting '$ARCHIVE' ..."
                        ${=DECOMP_CMD} =(${=WGET_CMD} "$ARCHIVE")
                else
                        print "ERROR: '$ARCHIVE' is neither a valid file nor a supported URI." >&2
                        RC=$((RC+8))
                fi
        done
        return $RC
}
Even w/o a extension in the filename!!
cb@obelix /tmp/tmp.ylNTkhb5Ls % wget -q https://github.com/grml/grml-etc-core/archive/refs/heads/master.zip
cb@obelix /tmp/tmp.ylNTkhb5Ls % mv master.zip master
cb@obelix /tmp/tmp.ylNTkhb5Ls % simple-extract master
Archive:  master
b8f245bef11c1e7abd7bcfbba3f62b5eea614f79
   creating: grml-etc-core-master/
   creating: grml-etc-core-master/.github/
 extracting: grml-etc-core-master/.github/FUNDING.yml
   creating: grml-etc-core-master/.github/workflows/
  inflating: grml-etc-core-master/.github/workflows/test-build.yml
  inflating: grml-etc-core-master/.gitignore
  inflating: grml-etc-core-master/README.md
   creating: grml-etc-core-master/debian/
  inflating: grml-etc-core-master/debian/NEWS
  inflating: grml-etc-core-master/debian/changelog
 extracting: grml-etc-core-master/debian/conffiles
  inflating: grml-etc-core-master/debian/control
  inflating: grml-etc-core-master/debian/copyright
  inflating: grml-etc-core-master/debian/gbp.conf
  inflating: grml-etc-core-master/debian/grml-etc-core.lintian-overrides
  inflating: grml-etc-core-master/debian/install
 extracting: grml-etc-core-master/debian/manpages
  inflating: grml-etc-core-master/debian/postrm
  inflating: grml-etc-core-master/debian/preinst
  inflating: grml-etc-core-master/debian/rules
   creating: grml-etc-core-master/debian/source/
 extracting: grml-etc-core-master/debian/source/format
   creating: grml-etc-core-master/doc/
  inflating: grml-etc-core-master/doc/Makefile
  inflating: grml-etc-core-master/doc/grmlzshrc.adoc
   creating: grml-etc-core-master/etc/
   creating: grml-etc-core-master/etc/apt/
   creating: grml-etc-core-master/etc/apt/grml/
  inflating: grml-etc-core-master/etc/apt/grml/listbugs
   creating: grml-etc-core-master/etc/grml/
  inflating: grml-etc-core-master/etc/grml/lsb-functions
  inflating: grml-etc-core-master/etc/grml/screen_multisession
  inflating: grml-etc-core-master/etc/grml/screenrc
  inflating: grml-etc-core-master/etc/grml/screenrc_acpi
  inflating: grml-etc-core-master/etc/grml/screenrc_generic
  inflating: grml-etc-core-master/etc/grml/script-functions
  inflating: grml-etc-core-master/etc/grml/sysexits-sh
  inflating: grml-etc-core-master/etc/grml_colors
  inflating: grml-etc-core-master/etc/grml_nocolors
  inflating: grml-etc-core-master/etc/minimal-shellrc
   creating: grml-etc-core-master/etc/network/
  inflating: grml-etc-core-master/etc/network/interfaces.examples
   creating: grml-etc-core-master/etc/skel/
  inflating: grml-etc-core-master/etc/skel/.emacs
  inflating: grml-etc-core-master/etc/skel/.gitconfig
  inflating: grml-etc-core-master/etc/skel/.hgrc
   creating: grml-etc-core-master/etc/skel/.vim/
   creating: grml-etc-core-master/etc/skel/.vim/ftplugin/
  inflating: grml-etc-core-master/etc/skel/.vim/ftplugin/c.vim
  inflating: grml-etc-core-master/etc/skel/.vim/klammerpaare.vim
   creating: grml-etc-core-master/etc/skel/.vim/plugin/
  inflating: grml-etc-core-master/etc/skel/.vim/plugin/DirDiff.vim
 extracting: grml-etc-core-master/etc/skel/.vim/spellfile.add
  inflating: grml-etc-core-master/etc/skel/.zshrc
  inflating: grml-etc-core-master/etc/tmux.conf
   creating: grml-etc-core-master/etc/vim/
  inflating: grml-etc-core-master/etc/vim/vimrc
   creating: grml-etc-core-master/etc/zsh/
  inflating: grml-etc-core-master/etc/zsh/keephack
  inflating: grml-etc-core-master/etc/zsh/zlogin
  inflating: grml-etc-core-master/etc/zsh/zprofile
  inflating: grml-etc-core-master/etc/zsh/zshenv
  inflating: grml-etc-core-master/etc/zsh/zshrc
   creating: grml-etc-core-master/usr_share_grml/
   creating: grml-etc-core-master/usr_share_grml/zsh/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/debian/_debian_rules
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-lang
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-tips
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/grml/_grml-wallpaper
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_fbset
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/linux/_iwconfig
   creating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_hl_complete
  inflating: grml-etc-core-master/usr_share_grml/zsh/completion/unix/_lookup
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_cpan
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_msgid
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_patchtrack
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_deb_pts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_dsc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_filewatcher
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_freshmeat
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_gmane
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_google
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_grml_bts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_koders
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_leo
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_letssingit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_rfc
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_sourceforge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_usenet
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_wikipedia
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/Backends/LOOKUP_be_zsh_mla
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_browser
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_context
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_encode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_guard
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_help
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_hook
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_parseopts
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/LOOKUP_query_handler
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/Lookup/lookupinit
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/exirename
   creating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/grml/grml-wallpaper
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/hl
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/ipv6-tunnel
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/linenr
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/lsdisk
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/minimal-shell
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/purge
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/readme
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/urldecode
  inflating: grml-etc-core-master/usr_share_grml/zsh/functions/weather
cb@obelix /tmp/tmp.ylNTkhb5Ls % ls
grml-etc-core-master  master

@crpb crpb marked this pull request as draft April 12, 2025 10:11
Copy link

@anarcat anarcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, NIH--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simple-extract: alternative (un)compressor - 7zip
2 participants