Debian Codegraph @

snap/hooks/install

raw
1 #!/bin/sh
2 # SPDX-License-Identifier: Apache-2.0
3 # SPDX-FileCopyrightText: Zygmunt Krynicki
4 set -eu
5
6 if ! echo "$SNAP_REVISION" | grep -E -q 'x[0-9]+'; then
7 GARDEN_COMPONENT=qemu-"$(uname -m | sed -e 's/_/-/')"
8 if [ ! -d "$SNAP"/../components/"$SNAP_REVISION"/"$GARDEN_COMPONENT" ]; then
9 echo "Installing qemu component for host CPU architecture..." >&2
10 exec snapctl install +"$GARDEN_COMPONENT" >&2
11 fi
12 fi