Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
eepm
Commits
117ac8dc
Commit
117ac8dc
authored
Mar 31, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erc: add --use-7z and --use-patool
parent
2f5642f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
erc-sh-archive
bin/erc-sh-archive
+14
-7
tools_erc
bin/tools_erc
+10
-0
No files found.
bin/erc-sh-archive
View file @
117ac8dc
...
...
@@ -20,15 +20,22 @@
have_patool
()
{
# TODO: optimize?
is_command patool
[
-n
"
$use_7z
"
]
&&
return
1
[
-n
"
$use_patool
"
]
||
is_command patool
}
HAVE_7Z
=
''
if
!
have_patool
;
then
# TODO: try install patool and p7zip
is_command 7za
&&
HAVE_7Z
=
"7za"
is_command 7z
&&
HAVE_7Z
=
"7z"
fi
set_backend
()
{
HAVE_7Z
=
'7z'
[
-n
"
$use_patool
"
]
&&
[
-n
"
$use_7z
"
]
&&
fatal
"Don't use --use-7z and --use-tool simulateously."
if
[
-n
"
$use_7z
"
]
||
!
have_patool
;
then
# TODO: try install patool and p7zip
is_command 7za
&&
HAVE_7Z
=
'7za'
#is_command 7z && HAVE_7Z='7z'
fi
[
-z
"
$force
"
]
||
HAVE_7Z
=
"
$HAVE_7Z
-y"
}
list_subformats
()
...
...
bin/tools_erc
View file @
117ac8dc
...
...
@@ -209,6 +209,8 @@ progname="${0##*/}"
force
=
target
=
verbose
=
--verbose
use_7z
=
use_patool
=
if
[
-z
"$"
]
;
then
echo
"Etersoft archive manager version @VERSION@"
>
&2
...
...
@@ -232,6 +234,12 @@ case "$1" in
-f
|
--force
)
# HELPOPT: override target
force
=
-f
;;
--use-patool
)
# HELPOPT: force use patool as backend
use_patool
=
1
;;
--use-7z
)
# HELPOPT: force use 7z as backend
use_7z
=
1
;;
-
*
)
fatal
"Unknown option '
$1
'"
;;
...
...
@@ -242,6 +250,8 @@ esac
shift
done
set_backend
cmd
=
"
$1
"
eval
lastarg
=
\$
{
$#}
...
...
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