Skip to content

Commit cb88a5d

Browse files
new function list_parser
1 parent fbb57bd commit cb88a5d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

plugins/envsetup

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,26 @@ is_mounted() {
6464
fi
6565
}
6666

67+
list_parser() {
68+
export count
69+
export include_list
70+
71+
count=0
72+
include_list=""
73+
74+
list_file=$1
75+
76+
if [ -f "$list_file" ]; then
77+
buffer=$(cat "$list_file")
78+
for line in $buffer; do
79+
((count++))
80+
include_list+=" $line"
81+
done
82+
else
83+
echo "File $list_file not found.."
84+
fi
85+
}
86+
6787
depends_on() {
6888
local packages="$1"
6989
export x

0 commit comments

Comments
 (0)