diff options
| author | Nathan Perry <np@nathanperry.dev> | 2020-09-25 19:52:35 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2020-09-25 19:52:35 -0400 |
| commit | 0e3ea2f3f4cef9398141e894df6838ac5c07eb42 (patch) | |
| tree | e6ff64a1349289258d57b3c4fa623fd3d1d89ace | |
| parent | f997fefc63fda5a19e641bb499eed9e90c40ebdf (diff) | |
update scripts
| -rw-r--r-- | bin/mingw-install.sh | 40 | ||||
| -rwxr-xr-x | setup_db.sh | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/bin/mingw-install.sh b/bin/mingw-install.sh new file mode 100644 index 0000000..6a805e6 --- /dev/null +++ b/bin/mingw-install.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -euo pipefail + +tmp=$(mktemp -d) + +cleanup() { + status=$? + + rm -rf "$tmp" + + exit $status +} + +trap cleanup EXIT +cd "$tmp" + +echo -n "Downloading mysql lib... " >&2 + +wget \ + 'https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.11-winx64.zip' \ + -qO out.zip + +echo "done" >&2 + +pacman -Sq --noconfirm --needed unzip + +unzip -j -o out.zip -d unzipped + +mv unzipped/libmysql.dll /mingw64/lib/libmysql.dll.a +mv unzipped/libmysql.lib /mingw64/lib/libmysql.a + +echo "Installing required packages..." >&2 + +exec pacman -Sq --noconfirm --needed \ + mingw-w64-x86_64-toolchain \ + mingw-w64-x86_64-opus \ + mingw-w64-x86_64-sqlite3 \ + mingw-w64-x86_64-postgresql \ + mingw-w64-x86_64-openssl \ diff --git a/setup_db.sh b/setup_db.sh index 8d819e5..b9eb3b9 100755 --- a/setup_db.sh +++ b/setup_db.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -e +set -euo pipefail export PGPASSWORD=clickheretodie |
