makeall: Use set -e to exit on failure

And pretty the building/installing up a little, rather than a huge chain of &&
This commit is contained in:
Robin Burchell 2019-05-15 20:30:00 +02:00 committed by Andreas Kling
parent c6bc23a748
commit ac2a3b65bb
Notes: sideshowbarker 2024-07-19 14:08:12 +09:00

View file

@ -1,4 +1,5 @@
#!/bin/bash
set -e
sudo id
@ -8,55 +9,43 @@ fi
make_cmd="make -j $MAKEJOBS"
$make_cmd -C ../LibC clean && \
$make_cmd -C ../LibC && \
(cd ../LibC && ./install.sh) && \
$make_cmd -C ../LibM clean && \
$make_cmd -C ../LibM && \
(cd ../LibM && ./install.sh) && \
$make_cmd -C ../LibCore clean && \
$make_cmd -C ../LibCore && \
$make_cmd -C ../Servers/LookupServer clean && \
$make_cmd -C ../Servers/LookupServer && \
$make_cmd -C ../Servers/WindowServer clean && \
$make_cmd -C ../Servers/WindowServer && \
$make_cmd -C ../LibGUI clean && \
$make_cmd -C ../LibGUI && \
$make_cmd -C ../Userland clean && \
$make_cmd -C ../Userland && \
$make_cmd -C ../Applications/Terminal clean && \
$make_cmd -C ../Applications/Terminal && \
$make_cmd -C ../Applications/FontEditor clean && \
$make_cmd -C ../Applications/FontEditor && \
$make_cmd -C ../Applications/Launcher clean && \
$make_cmd -C ../Applications/Launcher && \
$make_cmd -C ../Applications/FileManager clean && \
$make_cmd -C ../Applications/FileManager && \
$make_cmd -C ../Applications/ProcessManager clean && \
$make_cmd -C ../Applications/ProcessManager && \
$make_cmd -C ../Applications/TextEditor clean && \
$make_cmd -C ../Applications/TextEditor && \
$make_cmd -C ../Applications/About clean && \
$make_cmd -C ../Applications/About && \
$make_cmd -C ../Applications/IRCClient clean && \
$make_cmd -C ../Applications/IRCClient && \
$make_cmd -C ../Applications/Taskbar clean && \
$make_cmd -C ../Applications/Taskbar && \
$make_cmd -C ../Applications/Downloader clean && \
$make_cmd -C ../Applications/Downloader && \
$make_cmd -C ../DevTools/VisualBuilder clean && \
$make_cmd -C ../DevTools/VisualBuilder && \
$make_cmd -C ../Games/Minesweeper clean && \
$make_cmd -C ../Games/Minesweeper && \
$make_cmd -C ../Games/Snake clean && \
$make_cmd -C ../Games/Snake && \
$make_cmd -C ../Shell clean && \
$make_cmd -C ../Shell && \
$make_cmd -C ../Demos/HelloWorld clean && \
$make_cmd -C ../Demos/HelloWorld && \
$make_cmd -C ../Demos/RetroFetch clean && \
$make_cmd -C ../Demos/RetroFetch && \
$make_cmd clean &&\
$make_cmd && \
build_targets=""
build_targets="$build_targets ../LibC"
build_targets="$build_targets ../LibM"
build_targets="$build_targets ../LibCore"
build_targets="$build_targets ../Servers/LookupServer"
build_targets="$build_targets ../Servers/WindowServer"
build_targets="$build_targets ../LibGUI"
build_targets="$build_targets ../Userland"
build_targets="$build_targets ../Applications/Terminal"
build_targets="$build_targets ../Applications/FontEditor"
build_targets="$build_targets ../Applications/Launcher"
build_targets="$build_targets ../Applications/FileManager"
build_targets="$build_targets ../Applications/ProcessManager"
build_targets="$build_targets ../Applications/TextEditor"
build_targets="$build_targets ../Applications/About"
build_targets="$build_targets ../Applications/IRCClient"
build_targets="$build_targets ../Applications/Taskbar"
build_targets="$build_targets ../Applications/Downloader"
build_targets="$build_targets ../DevTools/VisualBuilder"
build_targets="$build_targets ../Games/Minesweeper"
build_targets="$build_targets ../Games/Snake"
build_targets="$build_targets ../Shell"
build_targets="$build_targets ../Demos/HelloWorld"
build_targets="$build_targets ../Demos/RetroFetch"
for targ in $build_targets; do
echo "Building $targ"
$make_cmd -C "$targ" clean
$make_cmd -C "$targ"
if [ -f "$targ/install.sh" ]; then
echo "Installing $targ"
(cd "$targ" && ./install.sh)
fi
done
$make_cmd clean
$make_cmd
sudo ./sync.sh