1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

extract: add RPM archive support (#8347)

Also more quiet extraction. -D for cpio was not used due to additional
output.
This commit is contained in:
Richard Pöttler
2019-11-19 17:00:53 +01:00
committed by Marc Cornellà
parent 26df8a2274
commit 68c4c06283
3 changed files with 3 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ extract() {
(*.z) uncompress "$1" ;;
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.rpm) mkdir "$extract_dir" && cd "$extract_dir" && rpm2cpio "../$1" | cpio --quiet -id && cd .. ;;
(*.7z) 7za x "$1" ;;
(*.deb)
mkdir -p "$extract_dir/control"