-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.sh
More file actions
35 lines (28 loc) · 733 Bytes
/
build.sh
File metadata and controls
35 lines (28 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# SPDX-FileCopyrightText: 2020 Stalwart Labs Ltd <hello@stalw.art>
#
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
#
# Output file
output_file="spam-filter.toml"
cp versions.toml "$output_file"
echo -e "" >> "$output_file"
if [ -d "rules" ]; then
for file in rules/*.toml; do
if [ -f "$file" ]; then
cat "$file" >> "$output_file"
echo -e "\n" >> "$output_file"
fi
done
fi
if [ -d "lists" ]; then
echo "# Lists" >> "$output_file"
for file in lists/*.toml; do
if [ -f "$file" ]; then
cat "$file" >> "$output_file"
echo -e "\n" >> "$output_file"
fi
done
fi
echo "Combined TOML files into $output_file"