Commit 21506f49 authored by Luca Giambonini's avatar Luca Giambonini

if order file exist then execute the parsing

parent 5a3337f0
......@@ -131,20 +131,22 @@ function list_packages() {
# check if there are some .order file
_list_changes _orders '*.order' '%' --no-commit-id --pretty=format: --name-only -r --diff-filter=AM || return 1
_log message ".order file detected, processing..."
PACKAGES=()
ORDERLIST_AVAILABLE=true
for _order in "${_orders[@]}"; do
exec 3<$_order
while read -u3 _line; do
[[ $_line =~ ^[:blank:]*$ ]] && continue
local comment_re="^[:blank:]*#"
[[ $_line =~ $comment_re ]] && continue
PACKAGES+=("${_line}")
if [ -n "$_orders" ]; then
_log message ".order file detected, processing..."
PACKAGES=()
ORDERLIST_AVAILABLE=true
for _order in "${_orders[@]}"; do
exec 3<$_order
while read -u3 _line; do
[[ $_line =~ ^[:blank:]*$ ]] && continue
local comment_re="^[:blank:]*#"
[[ $_line =~ $comment_re ]] && continue
PACKAGES+=("${_line}")
done
done
done
fi
# remove duplicates without changing the order
# (http://www.unixcl.com/2008/03/remove-duplicates-without-sorting-file.html)
......
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