jw-pkg fix: List-template-tables output templates

This patch fixes jw-pkg. It output templates, not template-tables.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-05-16 16:00:34 +00:00
commit 022d78c98d

View file

@ -188,7 +188,7 @@ cmd_list_templates()
local ext_from_re=`echo $ext_from | sed 's/\./\\./g'` local ext_from_re=`echo $ext_from | sed 's/\./\\./g'`
local f local f
list_packages "$@" | xargs -r rpm -ql | while read f; do list_packages "$@" | xargs -r rpm -ql | while read f; do
[ -f "$f" ] || continue [ -f "$f" -o -L "$f" ] || continue
echo $f | grep -q "$ext_from_re$" || continue echo $f | grep -q "$ext_from_re$" || continue
echo $f echo $f
done done
@ -197,12 +197,13 @@ cmd_list_templates()
cmd_list_template_tables() cmd_list_template_tables()
{ {
local ext_from="$table_exts" local ext_from="$table_exts"
local e f local e f t
list_packages "$@" | xargs -r rpm -ql | while read f; do list_packages "$@" | xargs -r rpm -ql | while read f; do
[ -f "$f" -o -L "$f" ] || continue [ -f "$f" -o -L "$f" ] || continue
for e in $ext_from; do for e in $ext_from; do
[ -f "${f%.*}$e" ] || continue t="${f%.*}$e"
echo $f [ -f "$t" ] || continue
echo $t
done done
done done
} }