[AED] Update setup.sh
Signed-off-by: TiagoRG <tiago.rgarcia@ua.pt>
This commit is contained in:
parent
ce042123ce
commit
76427d00f6
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
|
||||
cd "$parent_path" || exit
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <source file>"
|
||||
exit 1
|
||||
|
@ -22,4 +25,9 @@ fi
|
|||
|
||||
gcc -Wall -Wextra -Werror -g -o "out/$out_dirname/${out_basename%.*}" "$1" -lm
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
out/"$out_dirname"/"${out_basename%.*}"
|
||||
|
|
Loading…
Reference in New Issue