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() ...@@ -53,7 +53,7 @@ check_pkg_integrity()
true 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 docmd erc test "$PKG" && return
;; ;;
esac esac
......
...@@ -250,7 +250,7 @@ __prepare_source_package() ...@@ -250,7 +250,7 @@ __prepare_source_package()
[ -x "$alpkg" ] || docmd chmod u+x $verbose "$alpkg" [ -x "$alpkg" ] || docmd chmod u+x $verbose "$alpkg"
./$alpkg --appimage-extract || fatal ./$alpkg --appimage-extract || fatal
alpkg=$PKGNAME-$VERSION.tar alpkg=$PKGNAME-$VERSION.tar
assure_exists erc || epm ei erc || fatal assure_exists_erc
# make a tar for alien # make a tar for alien
a= erc a $alpkg squashfs-root a= erc a $alpkg squashfs-root
return return
...@@ -259,7 +259,7 @@ __prepare_source_package() ...@@ -259,7 +259,7 @@ __prepare_source_package()
__set_version_pkgname $alpkg __set_version_pkgname $alpkg
if [ -n "$VERSION" ] ; then if [ -n "$VERSION" ] ; then
# TODO: don't use erc for detect type? then we potentially can skip install it # 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)" pkgtype="$(a= erc type $alpkg)"
local newalpkg local newalpkg
newalpkg=$PKGNAME-$VERSION.$pkgtype newalpkg=$PKGNAME-$VERSION.$pkgtype
...@@ -273,7 +273,7 @@ __prepare_source_package() ...@@ -273,7 +273,7 @@ __prepare_source_package()
# converts directly unsupported formats # converts directly unsupported formats
newalpkg=$PKGNAME-$VERSION.tar newalpkg=$PKGNAME-$VERSION.tar
#newalpkg=$(basename $alpkg .$pkgtype).tar #newalpkg=$(basename $alpkg .$pkgtype).tar
assure_exists erc || epm ei erc || fatal assure_exists_erc
a= erc repack $alpkg $newalpkg || fatal a= erc repack $alpkg $newalpkg || fatal
fi fi
if [ "$alpkg" != "$newalpkg" ] ; then if [ "$alpkg" != "$newalpkg" ] ; then
......
...@@ -496,6 +496,13 @@ assure_exists() ...@@ -496,6 +496,13 @@ assure_exists()
( direct='' epm_assure "$1" $package $3 ) || fatal "Can't assure in '$1' command from $package$textpackage package" ( 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 # will replaced within disabled_eget in packaged version
eget() 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