| 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # SPDX-FileCopyrightText: Zygmunt Krynicki |
| 4 | set -eu |
| 5 | |
| 6 | GARDEN_QEMU_SYSTEM=aarch64 |
| 7 | GARDEN_COMPONENT=qemu-"$GARDEN_QEMU_SYSTEM" |
| 8 | ln -nfs ../../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" "$SNAP"/components/"$GARDEN_COMPONENT" |
| 9 | |
| 10 | GARDEN_QEMU_SYSTEM=ppc64 |
| 11 | GARDEN_COMPONENT=qemu-"$GARDEN_QEMU_SYSTEM" |
| 12 | ln -nfs ../../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" "$SNAP"/components/"$GARDEN_COMPONENT" |
| 13 | |
| 14 | GARDEN_QEMU_SYSTEM=riscv64 |
| 15 | GARDEN_COMPONENT=qemu-"$GARDEN_QEMU_SYSTEM" |
| 16 | ln -nfs ../../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" "$SNAP"/components/"$GARDEN_COMPONENT" |
| 17 | |
| 18 | GARDEN_QEMU_SYSTEM=s390x |
| 19 | GARDEN_COMPONENT=qemu-"$GARDEN_QEMU_SYSTEM" |
| 20 | ln -nfs ../../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" "$SNAP"/components/"$GARDEN_COMPONENT" |
| 21 | |
| 22 | # NOTE The difference between _ and -. |
| 23 | GARDEN_QEMU_SYSTEM=x86_64 |
| 24 | GARDEN_COMPONENT=qemu-x86-64 |
| 25 | ln -nfs ../../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" "$SNAP"/components/"$GARDEN_COMPONENT" |
| 26 | |
| 27 | unset GARDEN_QEMU_SYSTEM |
| 28 | unset GARDEN_COMPONENT |
| 29 | |
| 30 | # Execute subsequent element of the command-chain. |
| 31 | exec "$@" |