blob: 5a47c66a2426e0c92a522bb4b4cd8e6430ad82de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash -e
#
# Example script mounting a qcow-image
# and performing somce actions on-top of it.
#
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
IMAGE=$1
export ROOTFS_DIR=$2
echo "${SCRIPT_DIR}/../imagetool.sh" -m "${IMAGE}" "${ROOTFS_DIR}"
"${SCRIPT_DIR}/../imagetool.sh" -m "${IMAGE}" "${ROOTFS_DIR}"
source "${SCRIPT_DIR}/common"
on_chroot << EOF
# do something ...
apt-get -o APT::Acquire::Retries=3 install -y nasm yasm
EOF
echo "${SCRIPT_DIR}/../imagetool.sh" -u "${ROOTFS_DIR}"
"${SCRIPT_DIR}/../imagetool.sh" -u "${ROOTFS_DIR}"
|