chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / postgresql / install.sh
index 68b2e2b661279816aaea1fa980164f6890e3ea88..7f2aecc5fbea239003c2160796d30ec5a0dda52e 100644 (file)
@@ -1,3 +1,4 @@
+#!/bin/bash
 # title: PostgreSQL (Postgres alias)
 # homepage: https://webinstall.dev/postgres
 # tagline: Alias for https://webinstall.dev/postgres
@@ -6,4 +7,5 @@
 #   See https://webinstall.dev/postgres
 
 echo "'postgresql' is an alias for 'postgres'"
-curl -fsSL https://webinstall.dev/postgres@${WEBI_VERSION:-} | bash
+WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
+curl -fsSL "$WEBI_HOST/postgres@${WEBI_VERSION:-}" | bash