~rabbits/seconth

2be07dace2382b6ab3ff533c03e10118850e921c — neauoire 9 months ago 3e3d1e7
Improved build script
1 files changed, 9 insertions(+), 7 deletions(-)

M build.sh
M build.sh => build.sh +9 -7
@@ 6,19 6,21 @@ clang-format -i 2th.c
# Clean
rm -f ./2th

# Linux
# Build(debug)
# cc -std=c89 -DDEBUG -Wall -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined -o 2th 2th.c

# Linux(fast)
# Build(fast)
cc 2th.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -o 2th

# Size
echo "Size: $(du -sk ./2th)"

./2th events.calendar

if [ -d "$HOME/bin" ] 
# Install
if [ -d "$HOME/bin" ] && [ -e ./2th ]
then
	mv ./2th ~/bin
    echo "Installed $HOME/bin" 
	cp ./2th $HOME/bin
    echo "Installed: $HOME/bin" 
fi

# Run
./2th events.calendar