OrcaSlicer/linux.d
Sebastian Kuzminsky 91ffc79c7b
Some checks failed
Build all / Build All (push) Has been cancelled
Build all / Flatpak (push) Has been cancelled
better version check in linux build script (#9496)
* better version check in linux build script

Running `BuildLinux.sh` on Debian Trixie (and probably on other platforms)
results in this warning:
```
$ sudo ./BuildLinux.sh -u
./linux.d/debian: line 32: [: ==: unary operator expected
./linux.d/debian: line 32: [: ==: unary operator expected
...
```

The script is looking for the `VERSION_ID` variable
in `/etc/os-release`, but that variable is optional (see
https://www.linux.org/docs/man5/os-release.html) and is not present in
my install of Debian Trixie.  The script handles the missing variable
incorrectly, resulting in the above warning.

This commit fixes the version check to be more tolerant and IMO clearer.

Tested on Ubuntu 22.04, 24.04, and Debian Trixie.
2025-06-02 23:11:19 +08:00
..
arch adds libspnav-dev dependency to linux.d/debian (#9498) 2025-05-16 09:37:52 +08:00
clear-linux-os support Clear Linux OS (#5652) 2024-06-29 12:21:29 +08:00
debian better version check in linux build script (#9496) 2025-06-02 23:11:19 +08:00
fedora adds libspnav-dev dependency to linux.d/debian (#9498) 2025-05-16 09:37:52 +08:00
README.md rework of Linux build scripts (#4850) 2024-04-11 22:11:31 +08:00

Files in this directory are named for the exact output of awk -F= '/^ID=/ {print $2}' /etc/os-release for their respective distribution.

When BuildLinux.sh is executed, the respective file for the distribution will be sourced so the distribution specific instructions/logic are used.