Commit cfbd0941 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm pack: add list argument (eterbug #17417)

parent 890268b6
...@@ -116,6 +116,26 @@ __epm_pack() ...@@ -116,6 +116,26 @@ __epm_pack()
return 0 return 0
} }
__list_all_app()
{
cd $EPM_PACK_SCRIPTS_DIR || fatal
for i in *.sh ; do
local name=${i/.sh/}
startwith "$name" "common" && continue
echo "$name"
done
cd - >/dev/null
}
__epm_pack_list()
{
for i in $(__list_all_app) ; do
echo "$i"
done
exit
}
epm_pack_help() epm_pack_help()
{ {
message ' message '
...@@ -130,6 +150,7 @@ Options: ...@@ -130,6 +150,7 @@ Options:
--repack - force repack ever if returned package can be installed without repack --repack - force repack ever if returned package can be installed without repack
--download-only - save pack result and exit --download-only - save pack result and exit
--save-only - save repacked packages and exit (this is default behaviour) --save-only - save repacked packages and exit (this is default behaviour)
--list - list all available receipts
' '
} }
...@@ -137,10 +158,16 @@ Options: ...@@ -137,10 +158,16 @@ Options:
epm_pack() epm_pack()
{ {
if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then case "$1" in
epm_pack_help -h|--help) # HELPCMD: help
exit epm_epm_install_help
fi return
;;
--list) # HELPCMD: list all available receipts
__list_all_app
return
;;
esac
local tmpdir local tmpdir
tmpdir="$(mktemp -d --tmpdir=$BIGTMPDIR)" || fatal tmpdir="$(mktemp -d --tmpdir=$BIGTMPDIR)" || fatal
...@@ -151,7 +178,7 @@ epm_pack() ...@@ -151,7 +178,7 @@ epm_pack()
local packversion="$3" local packversion="$3"
local url='' local url=''
[ -n "$packname" ] || fatal "run with packname, see --help" [ -n "$packname" ] || __epm_pack_list
if is_url "$tarname"; then if is_url "$tarname"; then
url="$tarname" url="$tarname"
......
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