-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (29 loc) · 1.41 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
echo ''
echo '███████╗██╗ ██╗██████╗ ██████╗ █████╗'
echo '██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗'
echo '███████╗██║ ██║██████╔╝██████╔╝███████║'
echo '╚════██║██║ ██║██╔═══╝ ██╔══██╗██╔══██║'
echo '███████║╚█████╔╝██║ ██║ ██║██║ ██║'
echo '╚══════╝ ╚════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝'
echo ''
# install meson or ninja if not exist
if ! [ -x "$(command -v meson)" ] || ! [ -x "$(command -v ninja)" ]; then
echo "meson not found, installing..."
pip install meson ninja --user
fi
export PATH=$PATH:$HOME/.local/bin
if ! [ -x "$(command -v meson)" ] || ! [ -x "$(command -v ninja)" ]; then
echo "meson install failed, please install manually"
echo ""
echo " Ubuntu (apt install meson ninja-build)"
echo " Fedora (dnf install meson ninja-build)"
echo " ArchLinux (pacman -S meson ninja)"
exit 1
fi
# build if build/build.ninja doesnt exist
if [ ! -f build/build.ninja ]; then
echo "building..."
meson build --prefix="$PWD" --bindir='' --buildtype=release
fi
ninja install -C build