diff --git a/scripts/unix.sh b/scripts/unix.sh new file mode 100644 index 0000000..bc68a03 --- /dev/null +++ b/scripts/unix.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +cd .. +git pull +platform=$(uname -a) + +if [[ $platform =~ "Darwin" ]] +then + go build -o webp-server-darwin-amd64 webp-server.go +elif [[ $platform =~ "x86_64" ]];then + go build -o webp-server-unix-amd64 webp-server.go +else + go build -o webp-server-linux-i386 webp-server.go +fi diff --git a/scripts/windows.bat b/scripts/windows.bat new file mode 100644 index 0000000..6cc15b6 --- /dev/null +++ b/scripts/windows.bat @@ -0,0 +1,14 @@ +cd .. +git pull + +IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT) +:64BIT +go build -o webp-server-windows-amd64.exe webp-server.go +GOTO END + +:32BIT +echo 32-bit... +go build -o webp-server-windows-i386.exe webp-server.go +GOTO END + +pause