diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 02:00:46 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 02:00:46 -0500 |
commit | 754e356adc8fa23f4cecef588406f126a3e1a4a4 (patch) | |
tree | 49b15bdc7438496de92adce948e5985259079b8d /src/SMAPI.Installer/unix-install.sh | |
parent | 52867bb634af4706abe41557728c58b27b69f34d (diff) | |
download | SMAPI-754e356adc8fa23f4cecef588406f126a3e1a4a4.tar.gz SMAPI-754e356adc8fa23f4cecef588406f126a3e1a4a4.tar.bz2 SMAPI-754e356adc8fa23f4cecef588406f126a3e1a4a4.zip |
add install scripts for Linux/Mac (#434)
Diffstat (limited to 'src/SMAPI.Installer/unix-install.sh')
-rw-r--r-- | src/SMAPI.Installer/unix-install.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/SMAPI.Installer/unix-install.sh b/src/SMAPI.Installer/unix-install.sh new file mode 100644 index 00000000..a0bd9346 --- /dev/null +++ b/src/SMAPI.Installer/unix-install.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Run the SMAPI installer through Mono on Linux or Mac. + +# Move to script's directory +cd "`dirname "$0"`" + +# get cross-distro version of POSIX command +COMMAND="" +if command -v command >/dev/null 2>&1; then + COMMAND="command -v" +elif type type >/dev/null 2>&1; then + COMMAND="type" +fi + +# validate Mono & run installer +if $COMMAND mono >/dev/null 2>&1; then + mono install.exe +else + echo "Oops! Looks like Mono isn't installed. Please install Mono from http://mono-project.com, reboot, and run this installer again." + read +fi |