Check if ~/bin exists before copying

This commit is contained in:
Santiago Bautista 2019-11-11 17:35:54 +01:00
parent 9531b393ab
commit 538a44187c
2 changed files with 8 additions and 4 deletions

View File

@ -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 "---------------------------------------------------------"

View File

@ -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 "---------------------------------------------------------"