Commit 0af4f5db authored by Vitaly Lipatov's avatar Vitaly Lipatov

move get_ext to common part and use erc for it

parent 90cfbf8a
......@@ -66,11 +66,6 @@ check_tarball()
erc -q check "$1"
}
get_ext()
{
rhas "$1" "\." && echo "$1" | sed -e "s|.*\.||" | grep -v "/"
}
# Args: URL TARGET
download_to()
{
......
......@@ -24,7 +24,7 @@ BuildRequires: rpm-build-compat >= %altcompat_ver
Requires: giter >= 1.10
Requires: eepm >= 1.7.2
Requires: erc >= 0.8
Requires: erc >= 0.9.2
Requires: rpm-build
Requires: rpm-build-compat >= %altcompat_ver
......
......@@ -158,6 +158,9 @@ DISTRVENDOR=$(realpath $ETERBUILDBIN/../../rpm-build-altlinux-compat/bin/distr_v
EPMCMD=$(realpath $ETERBUILDBIN/../../eepm/bin/epm 2>/dev/null)
[ -x "$EPMCMD" ] || EPMCMD=epm
ERCCMD=$(realpath $ETERBUILDBIN/../../erc/bin/erc 2>/dev/null)
[ -x "$ERCCMD" ] || ERCCMD=erc
print_list()
{
local i
......@@ -433,6 +436,14 @@ check_key()
check_ssh_key
}
get_ext()
{
# first check if it is archive
$ERCCMD type "$1" && return
# default code, it broken sequenced extensions (like .tar.gz)
rhas "$1" "\." && echo "$1" | sed -e "s|.*\.||" | grep -v "/"
}
make_temp_file()
{
# Workaround about broken mktemp
......
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