diff options
-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" |