diff options
author | Florian Pritz <bluewind@xinu.at> | 2020-01-02 18:15:38 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2020-01-02 18:20:04 +0100 |
commit | d62b9a4467ca6d6067f8600b2759fbda296f9da7 (patch) | |
tree | 2fa21a5cdfc5a352669f9990a929cb959cd0ff58 | |
parent | d59a2a3d6cd9a7449e654cf6fbee9a14a44619e9 (diff) | |
download | bin-d62b9a4467ca6d6067f8600b2759fbda296f9da7.tar.gz bin-d62b9a4467ca6d6067f8600b2759fbda296f9da7.tar.xz |
Add fwbuilder
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | fwbuilder | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fwbuilder b/fwbuilder new file mode 100755 index 0000000..23edbf3 --- /dev/null +++ b/fwbuilder @@ -0,0 +1,19 @@ +#!/bin/bash + +# Remove old compiled firewalls in case fwbuilder fails to compile. This +# prevents it from redeploying old files by mistake. + +set -eu + +if [[ "$#" != 1 ]]; then + echo "Usage: fwbuilder <file>" >&2 + exit 1 +fi + +file="$1" + +dir="$(dirname "$file")" +shopt -s nullglob +rm -f "$dir"/*.fw + +exec /usr/bin/fwbuilder "$file" |