Clear terminal and show header to make build output clearer
This commit is contained in:
25
build.sh
25
build.sh
@@ -1,21 +1,44 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
header() {
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "================================================================================"
|
||||||
|
echo "================================================================================"
|
||||||
|
echo " [[ $1 ]]"
|
||||||
|
echo "================================================================================"
|
||||||
|
echo "================================================================================"
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
if [ $1 = "build" ]; then
|
if [ $1 = "build" ]; then
|
||||||
|
header "Building"
|
||||||
|
|
||||||
make main -B
|
make main -B
|
||||||
|
|
||||||
elif [ $1 = "run" ]; then
|
elif [ $1 = "run" ]; then
|
||||||
|
header "Running"
|
||||||
|
|
||||||
make main
|
make main
|
||||||
./output/main 5000 ./library
|
./output/main 5000 ./library
|
||||||
|
|
||||||
elif [ $1 = "debug" ]; then
|
elif [ $1 = "debug" ]; then
|
||||||
|
header "Debugging"
|
||||||
|
|
||||||
make main
|
make main
|
||||||
gf2 ./output/main
|
gf2 ./output/main
|
||||||
|
|
||||||
elif [ $1 = "clean" ]; then
|
elif [ $1 = "clean" ]; then
|
||||||
|
header "Cleaning"
|
||||||
|
|
||||||
rm -rf ./output/
|
rm -rf ./output/
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Invalid command."
|
header "Invalid command."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user