From 6a4500733de9427a5686da3a8bd5b874f8aee219 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Mon, 24 Oct 2016 09:50:24 -0400 Subject: [PATCH] Add spacing to compile.sh (#53) --- plugins/compile.sh | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/plugins/compile.sh b/plugins/compile.sh index cf1740a9..a66a4003 100755 --- a/plugins/compile.sh +++ b/plugins/compile.sh @@ -1,28 +1,20 @@ -#!/bin/bash +#!/bin/bash -e cd "$(dirname "$0")" test -e compiled || mkdir compiled if [[ $# -ne 0 ]]; then - for i in "$@"; + for sourcefile in "$@" do - smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`"; - echo -e "Compiling $i..."; - ./spcomp $i -ocompiled/$smxfile - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1; - fi + smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`" + echo -e "\nCompiling $sourcefile..." + ./spcomp $sourcefile -ocompiled/$smxfile done else for sourcefile in *.sp do smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`" - echo -e "Compiling $sourcefile ..." + echo -e "\nCompiling $sourcefile ..." ./spcomp $sourcefile -ocompiled/$smxfile - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1; - fi done fi