Skip to content

Commit

Permalink
Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg68 committed Dec 14, 2024
1 parent 14411ba commit 8dd0c5c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions build-scripts/for-linux/prepare-debian-based.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ DIR=`dirname $0`

. $DIR/prepare-parse-prms.bash

CURRENT_ARCH=$(dpkg --print-architecture)
if [[ "$TARGET_CPU" == "auto" ]]; then
TARGET_ARCH=$CURRENT_ARCH
else
TARGET_ARCH=$TARGET_CPU
fi

# calculate wx package name
case "$WX_VER" in
wx32)
Expand All @@ -34,9 +41,6 @@ esac

echo "wx package: $WX_PKG_NAME"

CURRENT_ARCH=$(dpkg --print-architecture)
TARGET_ARCH="${2:-$CURRENT_ARCH}"

OS_DISTR=$(awk -F= '$1=="ID" {print $2;}' /etc/os-release)
[[ "$OS_DISTR" == "ubuntu" ]] && $DIR/prepare-ubuntu-wx-repo.bash $WX_PKG_NAME

Expand Down
10 changes: 7 additions & 3 deletions build-scripts/for-linux/prepare-parse-prms.bash
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/bash

WX_VER=auto
INSTALL_TESTS=notests
TARGET_CPU=auto
WX_VER=auto

# parse parameters
while [[ $# -gt 0 ]]; do
if [[ -n "$1" ]]; then
case $1 in
wx30 | wx32)
WX_VER=$1
amd64 | armhf | arm64)
TARGET_CPU=$1
;;
tests | notests)
INSTALL_TESTS=$1
;;
wx30 | wx32)
WX_VER=$1
;;
*)
echo "Unknown parameter $1" >&2
echo "Usage: $(basename $0) [wx30 | wx32] [tests | notests]"
Expand Down

0 comments on commit 8dd0c5c

Please sign in to comment.