From 538a44187c5ff52935bf2c9806b1792773952fff Mon Sep 17 00:00:00 2001 From: Santiago Bautista Date: Mon, 11 Nov 2019 17:35:54 +0100 Subject: [PATCH] Check if ~/bin exists before copying --- src/build-debug.sh | 6 ++++-- src/subbuild-unix-unix.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/build-debug.sh b/src/build-debug.sh index 11632ff..3cc0e75 100755 --- a/src/build-debug.sh +++ b/src/build-debug.sh @@ -18,8 +18,10 @@ echo "Built the Linux binary" cp scyther-linux ../gui/Scyther/ # bonus... -cp scyther-linux ~/bin +if [ -d ~/bin ] ; then + cp scyther-linux ~/bin/ +fi -echo Copied the file to the gui directory and \~/bin +echo "Copied the file to the gui directory and \~/bin (if present)" echo "---------------------------------------------------------" diff --git a/src/subbuild-unix-unix.sh b/src/subbuild-unix-unix.sh index 4d8e2ee..a3a1e7a 100755 --- a/src/subbuild-unix-unix.sh +++ b/src/subbuild-unix-unix.sh @@ -15,8 +15,10 @@ echo "Built the Linux binary" cp scyther-linux ../gui/Scyther/ # bonus... -cp scyther-linux ~/bin +if [ -d ~/bin ] ; then + cp scyther-linux ~/bin/ +fi -echo Copied the file to the gui/Scyther directory and \~/bin +echo "Copied the file to the gui/Scyther directory and ~/bin (if present)" echo "---------------------------------------------------------"