Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions install_arch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

echo
echo "+------------------------------+"
echo "| FicTrac install script |"
echo "+------------------------------+"
echo

echo
echo "+-- Installing dependencies ---+"
echo

sudo pacman -S base-devel nlopt opencv # PROBABLY NOT EXHAUSTIVE! I HAVE ALREADY THINGS PREINSTALLED ON MY MACHINE. ALSO BASE-DEVEL IS PROBABLY OVERKILL

echo
echo "+------------------------------+"
echo "| FicTrac install script |"
echo "+------------------------------+"
echo

echo
echo "+-- Creating build directory --+"
echo
FICTRAC_DIR="$(dirname "$0")"
cd "$FICTRAC_DIR" # make sure we are in fictrac dir
if [ -d ./build ]; then
echo "Removing existing build dir"
rm -r ./build
fi
mkdir build
if [ -d ./build ]; then
echo "Created build dir"
cd ./build
else
echo "Uh oh, something went wrong attempting to create the build dir!"
exit
fi

echo
echo "+-- Generating build files ----+"
echo
cmake ..

echo
echo "+-- Building FicTrac ----------+"
echo
cmake --build . --config Release --parallel $(nproc) --clean-first

cd ..
if [ -f ./bin/fictrac ]; then
echo
echo "FicTrac built successfully!"
echo
else
echo
echo "Hmm... something seems to have gone wrong - can't find FicTrac executable."
echo
fi