File: simde-reset-build.sh

package info (click to toggle)
simde 0.7.2-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 28,284 kB
  • sloc: ansic: 410,189; sh: 174; makefile: 38; python: 26
file content (30 lines) | stat: -rwxr-xr-x 754 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

function configure {
  if [ -e "/opt/simde/${1}" ]; then
    rm -rf "/opt/simde/${1}";
  fi
  if [ -e "/usr/local/share/meson/cross/simde/${1}.cross" ]; then
    meson --cross-file="/usr/local/share/meson/cross/simde/${1}.cross" "/opt/simde/${1}" "/usr/local/src/simde"
  fi
}

if [ $# -gt 0 ]; then
  while [ $# -ge 1 ]; do
    configure "$1"

    shift
  done
else
  for cross in /usr/local/share/meson/cross/simde/*.cross; do
    target="$(basename "$cross" .cross)"
    if [ ! -e "/opt/simde/${target}" ]; then
      configure "$(basename "${target}" .cross)"
    fi
  done
  for target in "aarch64-clang-10" "emscripten"; do
    if [ ! -e "/opt/simde/${target}" ]; then
      configure "$(basename "${target}" .cross)"
    fi
  done
fi