/
githubmirror
/
code-server
Обзор
Документация
Войти
/
githubmirror
/
code-server
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ci/build/build-lib.sh
28 строк
763 B
Joe Previte
feat: add test for get_nfpm_arch
18 сен 2021, 02:07
Не верифицирован
18 сен 2021, 02:07
6a69248
Код
Авторство
О чём код?
#!/usr/bin/env bash # This is a library which contains functions used inside ci/build # # We separated it into it's own file so that we could easily unit test # these functions and helpers. # On some CPU architectures (notably node/uname "armv7l", default on Raspberry Pis), # different package managers have different labels for the same CPU (deb=armhf, rpm=armhfp). # This function returns the overriden arch on platforms # with alternate labels, or the same arch otherwise. get_nfpm_arch() { local PKG_FORMAT="${1:-}" local ARCH="${2:-}" case "$ARCH" in armv7l) if [ "$PKG_FORMAT" = "deb" ]; then echo armhf elif [ "$PKG_FORMAT" = "rpm" ]; then echo armhfp fi ;; *) echo "$ARCH" ;; esac }