nginx-configurator/build.sh

20 lines
388 B
Bash
Executable file

#!/bin/bash
DIR=$(mktemp -d)
pip install -r requirements.txt --target="$DIR"
cp -r nginx_configurator "$DIR"
cp -r config "$DIR"
#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" .
rm -r "$DIR"