Skip to content

Commit

Permalink
Support FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Apr 29, 2024
1 parent 101c73b commit 3473e8d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ win_ungztar() {
set_os_specific_vars() {
local os=$(uname)
case "$os" in
Darwin|Linux)
Darwin|Linux|FreeBSD)
OS_HAS_TOOLS=tar
OS_UNGZTAR_CMD="run_verbose_errexit tar xmzvf"
OS_LOCAL_DIR=.local
Expand All @@ -160,8 +160,8 @@ set_os_specific_vars() {
show_machine_info() {
local os=$(uname)
case "$os" in
Linux)
echo "OS: Linux"
Linux|FreeBSD)
echo "OS: $os"
lscpu | grep "^Archi\|^CPU\|^Bogo\|^Hyper\|^Virtualiz"

echo "Memory:"
Expand Down Expand Up @@ -670,7 +670,7 @@ fetch_stack() {
local os=$(uname)
case "$os" in
Darwin) retry_cmd fetch_stack_osx $1 ;;
Linux) retry_cmd fetch_stack_linux $1 ;;
Linux|FreeBSD) retry_cmd fetch_stack_linux $1 ;;
MINGW*) retry_cmd fetch_stack_windows $1 ;;
*) die "Unknown OS [$os]" ;;
esac
Expand Down Expand Up @@ -909,7 +909,7 @@ ghcup_install() {
# Determine GHCUP_ARCH
os=$(uname -s -m)
case "$os" in
"Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
"Linux x86_64"|"FreeBSD x86_64") GHCUP_ARCH="x86_64-linux" ;;
"Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
"Darwin arm64") GHCUP_ARCH="aarch64-apple-darwin" ;;
*) echo "Unknown OS/Arch: $os"; exit 1;;
Expand Down Expand Up @@ -1670,7 +1670,7 @@ install_hlint() {
OS=osx;;
MINGW*|MSYS*)
OS=windows;;
Linux)
Linux|FreeBSD)
OS=linux;;
*) die "install_hlint: unknown os";;
esac
Expand Down Expand Up @@ -1798,7 +1798,7 @@ your .hlint.ignore file."
install_docspec() {
show_step "Installing docspec from $DOCSPEC_URL"
case "$(uname)" in
Linux)
Linux|FreeBSD)
OS=linux;;
*) die "install_docspec: unknown or unsupported os";;
esac
Expand Down Expand Up @@ -1964,7 +1964,7 @@ get_sys_time() {
# Do not use floating point values so that we can avoid using bc for
# computations.
#Linux | MINGW*) date +%s.%N ;;
Linux | MINGW*) date +%s ;;
Linux | FreeBSD | MINGW*) date +%s ;;
Darwin) date +%s ;;
*) die "Unknown OS [$os]" ;;
esac
Expand Down

0 comments on commit 3473e8d

Please sign in to comment.