Commit c9e0294e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: add assure_exists_erc and use it

parent aa9506af
......@@ -53,7 +53,7 @@ check_pkg_integrity()
true
;;
*)
assure_exists erc || epm ei erc || fatal "erc is not available. can't check the package"
assure_exists_erc
docmd erc test "$PKG" && return
;;
esac
......
......@@ -250,7 +250,7 @@ __prepare_source_package()
[ -x "$alpkg" ] || docmd chmod u+x $verbose "$alpkg"
./$alpkg --appimage-extract || fatal
alpkg=$PKGNAME-$VERSION.tar
assure_exists erc || epm ei erc || fatal
assure_exists_erc
# make a tar for alien
a= erc a $alpkg squashfs-root
return
......@@ -259,7 +259,7 @@ __prepare_source_package()
__set_version_pkgname $alpkg
if [ -n "$VERSION" ] ; then
# TODO: don't use erc for detect type? then we potentially can skip install it
assure_exists erc || epm ei erc || fatal
assure_exists_erc
pkgtype="$(a= erc type $alpkg)"
local newalpkg
newalpkg=$PKGNAME-$VERSION.$pkgtype
......@@ -273,7 +273,7 @@ __prepare_source_package()
# converts directly unsupported formats
newalpkg=$PKGNAME-$VERSION.tar
#newalpkg=$(basename $alpkg .$pkgtype).tar
assure_exists erc || epm ei erc || fatal
assure_exists_erc
a= erc repack $alpkg $newalpkg || fatal
fi
if [ "$alpkg" != "$newalpkg" ] ; then
......
......@@ -496,6 +496,13 @@ assure_exists()
( direct='' epm_assure "$1" $package $3 ) || fatal "Can't assure in '$1' command from $package$textpackage package"
}
assure_exists_erc()
{
load_helper epm-assure
local package="erc"
( direct='' epm_assure "$package" ) || epm ei erc || fatal "erc is not available to install."
}
# will replaced within disabled_eget in packaged version
eget()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment