-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow for testing of minimum-versioned dependencies
- Loading branch information
Showing
4 changed files
with
116 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -eq 0 ]; then | ||
echo """USAGE: $0 [package] [command(default=meson)] | ||
package: the package name; since this varies between package manager | ||
repositories, we prefer to use the name from that used by the CI | ||
command: meson return a string for meson function \`dependency()\` | ||
ALA return a URL for the Arch Linux Archive (ALA), for CI | ||
https://archive.archlinux.org/ | ||
""" | ||
exit 2 | ||
fi | ||
dep=$1 | ||
[ $# -ge 2 ] && cmd=$2 || cmd=meson | ||
|
||
############################################# | ||
|
||
case $dep in | ||
fmt) | ||
result_meson='>=9.1.0' | ||
result_ala='https://archive.archlinux.org/packages/f/fmt/fmt-9.1.0-4-x86_64.pkg.tar.zst' | ||
;; | ||
*) | ||
echo "ERROR: dependency '$dep' is unknown" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
############################################# | ||
|
||
case $cmd in | ||
meson) echo $result_meson ;; | ||
ALA) echo $result_ala ;; | ||
*) | ||
echo "ERROR: command '$cmd' is unknown" >&2 | ||
exit 1 | ||
;; | ||
esac |