Commit 2907c53f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: fix print description

parent c4f8a384
...@@ -306,7 +306,7 @@ case "$1" in ...@@ -306,7 +306,7 @@ case "$1" in
esac esac
if [ "$1" = "--list-all" ] || [ "$1" = "list-all" ] || [ -z "$*" ] ; then if [ "$1" = "--list-all" ] || [ "$1" = "list-all" ] || [ -z "$*" ] ; then
[ -n "$short" ] || [ -n "$quiet" ] || echo "Available applications:" [ -n "$short" ] || [ -n "$quiet" ] || echo "Available applications (for current arch $($DISTRVENDOR -a)):"
__epm_play_list $psdir __epm_play_list $psdir
[ -n "$quiet" ] || [ -n "$*" ] && exit [ -n "$quiet" ] || [ -n "$*" ] && exit
echo echo
......
...@@ -15,7 +15,11 @@ check_url_is_accessible() ...@@ -15,7 +15,11 @@ check_url_is_accessible()
is_supported_arch() is_supported_arch()
{ {
local i local i
# skip checking if there are no arches
[ -n "$SUPPORTEDARCHES" ] || return 0 [ -n "$SUPPORTEDARCHES" ] || return 0
[ -n "$1" ] || return 0
for i in $SUPPORTEDARCHES ; do for i in $SUPPORTEDARCHES ; do
[ "$i" = "$1" ] && return 0 [ "$i" = "$1" ] && return 0
done done
...@@ -117,18 +121,6 @@ case "$1" in ...@@ -117,18 +121,6 @@ case "$1" in
esac esac
check_supported_arch()
{
# skip checking if no arches
[ -n "$1" ] || return 0
local arch="$(epm print info -a)"
for i in $* ; do
[ "$arch" = "$i" ] && return 0
done
return 1
}
# legacy compatibility and support direct run the script # legacy compatibility and support direct run the script
if [ -z "$DISTRVENDOR" ] ; then if [ -z "$DISTRVENDOR" ] ; then
export DISTRVENDOR="epm print info" export DISTRVENDOR="epm print info"
...@@ -141,4 +133,4 @@ if [ -z "$SUDO" ] && [ "$UID" != "0" ] ; then ...@@ -141,4 +133,4 @@ if [ -z "$SUDO" ] && [ "$UID" != "0" ] ; then
SUDO="sudo" SUDO="sudo"
fi fi
check_supported_arch $SUPPORTEDARCHES || fatal "Only '$SUPPORTEDARCHES' architectures is supported" is_supported_arch "$(epm print info -a)" || fatal "Only '$SUPPORTEDARCHES' architectures is supported"
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