aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-02-27 04:57:29 -0600
committerBrent Cook <busterb@gmail.com>2023-02-27 04:57:29 -0600
commit703f430428609c8c6d5b42f82522080e1c60f0ff (patch)
treed7180f820cffb83ecb0cd3324c3947529db6d666 /scripts
parentc305c7ac43b0fa3a47724cbff2ac3303eb163387 (diff)
downloadportable-703f430428609c8c6d5b42f82522080e1c60f0ff.tar.gz
portable-703f430428609c8c6d5b42f82522080e1c60f0ff.tar.bz2
portable-703f430428609c8c6d5b42f82522080e1c60f0ff.zip
add conditional around common apt commands
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test21
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/test b/scripts/test
index 65b8255..3f35eca 100755
--- a/scripts/test
+++ b/scripts/test
@@ -1,11 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2set -e 2set -e
3 3
4./autogen.sh
5
6unset CC 4unset CC
7sudo apt update 5
8sudo apt install -y cmake ninja-build 6if type apt-get >/dev/null
7then
8 sudo apt-get update
9 sudo apt-get install -y cmake ninja-build
10fi
11
12./autogen.sh
9 13
10if [ "x$ARCH" = "xnative" ]; then 14if [ "x$ARCH" = "xnative" ]; then
11 # test autotools 15 # test autotools
@@ -32,7 +36,6 @@ if [ "x$ARCH" = "xnative" ]; then
32 make -j 4 36 make -j 4
33 make test 37 make test
34 else 38 else
35
36 cmake -GNinja .. 39 cmake -GNinja ..
37 ninja -j 4 40 ninja -j 4
38 ninja test 41 ninja test
@@ -49,7 +52,7 @@ elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then
49 CPU=x86_64 52 CPU=x86_64
50 fi 53 fi
51 54
52 sudo apt install -y mingw-w64 55 sudo apt-get install -y mingw-w64
53 56
54 ./configure --host=$CPU-w64-mingw32 57 ./configure --host=$CPU-w64-mingw32
55 make -j 4 58 make -j 4
@@ -70,15 +73,15 @@ elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then
70 ) 73 )
71 74
72elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then 75elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then
73 sudo apt install -y qemu-user-static binfmt-support 76 sudo apt-get install -y qemu-user-static binfmt-support
74 77
75 if [ "x$ARCH" = "xarm32" ]; then 78 if [ "x$ARCH" = "xarm32" ]; then
76 sudo apt install -y g++-arm-linux-gnueabihf 79 sudo apt-get install -y g++-arm-linux-gnueabihf
77 sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ 80 sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/
78 ./configure --host=arm-linux-gnueabihf 81 ./configure --host=arm-linux-gnueabihf
79 LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib make -j 4 check 82 LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib make -j 4 check
80 else 83 else
81 sudo apt install -y g++-aarch64-linux-gnu 84 sudo apt-get install -y g++-aarch64-linux-gnu
82 sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ 85 sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/
83 ./configure --host=aarch64-linux-gnu 86 ./configure --host=aarch64-linux-gnu
84 LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib make -j 4 check 87 LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib make -j 4 check