Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
59a9b453
Unverified
Commit
59a9b453
authored
5 years ago
by
Alexander Kapshuna
Committed by
Marc Cornellà
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix(extract): support unpacking deb file from different directory
parent
6dc937ff
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/extract/extract.plugin.zsh
+7
-7
plugins/extract/extract.plugin.zsh
with
7 additions
and
7 deletions
+7
-7
plugins/extract/extract.plugin.zsh
View file @
59a9b453
...
...
@@ -60,13 +60,13 @@ extract() {
(
*
.rpm
)
mkdir
"
$extract_dir
"
&&
cd
"
$extract_dir
"
&&
rpm2cpio
"../
$1
"
| cpio
--quiet
-id
&&
cd
..
;;
(
*
.7z
)
7za x
"
$1
"
;;
(
*
.deb
)
mkdir
-p
"
$extract_dir
/control
"
mkdir
-p
"
$extract_dir
/data"
cd
"
$extract_dir
"
;
ar vx
"
../
${
1
}
"
>
/dev/null
cd
control
;
tar
xzvf
../control.tar.
gz
cd
../data
;
extract ../data.tar.
*
cd
..
;
rm
*
.tar.
*
debian-binary
cd
..
local pwd
=
"
$PWD
"
file
=
"
${
1
:A
}
"
mkdir
-p
"
$extract_dir
/control"
"
$extract_dir
/data"
builtin cd
-q
"
$extract_dir
"
;
ar vx
"
$file
"
>
/dev/null
builtin cd
-q
control
;
extract
../control.tar.
*
builtin cd
-q
../data
;
extract ../data.tar.
*
builtin cd
-q
..
;
command
rm
*
.tar.
*
debian-binary
builtin cd
-q
"
$pwd
"
;;
(
*
.zst
)
unzstd
"
$1
"
;;
(
*
.cab
)
cabextract
-d
"
$extract_dir
"
"
$1
"
;;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help