nginx-configurator/build.sh

21 lines
388 B
Bash
Raw Permalink Normal View History

2023-11-05 14:47:28 +01:00
#!/bin/bash
2023-11-04 23:02:34 +01:00
DIR=$(mktemp -d)
pip install -r requirements.txt --target="$DIR"
cp -r nginx_configurator "$DIR"
2023-11-05 14:47:28 +01:00
cp -r config "$DIR"
2023-11-04 23:02:34 +01:00
#python3 -m zipapp -p "/bin/python3" -m "nginx_configurator.main:cli" -o ncc "$DIR"
# create entrypoint
cat > "$DIR/ncc" <<EOF
#!/bin/python3
from nginx_configurator import main
main.cli()
EOF
chmod +x "$DIR/ncc"
tar -cf ncc.tar -C "$DIR" .
2023-11-04 23:02:34 +01:00
rm -r "$DIR"