From 231f730e621ebc3712d134333e2ceae8f1e8c1f6 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Wed, 2 May 2018 22:50:58 +0800 Subject: [PATCH] Use host file to get MiSTer IP for build.sh --- .gitignore | 1 + build.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 644e726..c40b70c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ # ignore directories Debug +host *.lst *.elf *.map diff --git a/build.sh b/build.sh index 0291436..6c63593 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,10 @@ #!/bin/bash +# create simple text file named 'host' in this folder with IP address of your MiSTer. + +HOST=192.168.1.75 +[ -f host ] && HOST=$(cat host) + # make script fail if any command failed, # so we don't need to check the exit status of every command. set -e @@ -7,14 +12,14 @@ set -o pipefail make set +e -plink root@192.168.1.75 -pw 1 'killall MiSTer' +plink root@$HOST -pw 1 'killall MiSTer' set -e ftp -n </dev/ttyS0 2>/dev/ttyS0 /dev/ttyS0 2>/dev/ttyS0