OrcaSlicer/scripts/linux.d/arch
coryrc 7aa3ce8a4d
Some checks failed
Shellcheck / Shellcheck (push) Has been cancelled
Shellcheck everything (#10730)
* Shellcheck all shell scripts

* Implement Shellcheck's recommendations

* Shellcheck the distribution-specific files

* Include the distro scripts to trigger action

* Fix array usage (hopefully)

* Use single-quote string

TIL: single quote string in yaml treats everything as literal, but
double quote allows backslash escaping.

* Make all cmake commands use set+-x dance and fix macos getopts line

Make Claude happy

getopts has colon after a command which takes an argument

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-09-20 09:12:31 +08:00

48 lines
879 B
Bash

#!/bin/bash
# these are the Arch Linux specific build functions
export FOUND_GTK3
FOUND_GTK3=$(pacman -Q gtk3)
# Addtional Dev packages for OrcaSlicer
export REQUIRED_DEV_PACKAGES=(
cmake
curl
dbus
eglexternalplatform
extra-cmake-modules
file
gettext
git
glew
gstreamer
gstreamermm
gtk3
libmspack
libsecret
libspnav
mesa
ninja
openssl
texinfo
wayland-protocols
webkit2gtk
wget
)
if [[ -n "$UPDATE_LIB" ]]
then
echo -n -e "Updating linux ...\n"
NEEDED_PKGS=()
for PKG in "${REQUIRED_DEV_PACKAGES[@]}"; do
pacman -Q "${PKG}" > /dev/null || NEEDED_PKGS+=("${PKG}")
done
if [[ "${#NEEDED_PKGS[*]}" -gt 0 ]]; then
sudo pacman -Syy --noconfirm "${NEEDED_PKGS[@]}"
fi
echo -e "done\n"
exit 0
fi
export FOUND_GTK3_DEV
FOUND_GTK3_DEV=${FOUND_GTK3}