Commit e1a21e11 authored by Vitaly Lipatov's avatar Vitaly Lipatov

get_package_type: rewrite without bashisms

parent e9e2268c
...@@ -256,11 +256,22 @@ assure_exists() ...@@ -256,11 +256,22 @@ assure_exists()
get_package_type() get_package_type()
{ {
local i local i
for i in deb rpm ; do case $1 in
[ "${1/.$i/}" != "$1" ] && echo $i && return *.deb)
done echo "deb"
echo "$1" return
return 0 ;;
*.rpm)
echo "rpm"
return
;;
*)
#fatal "Don't know type of $1"
# return package name for info
echo "$1"
return 1
;;
esac
} }
......
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