mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 09:45:24 +01:00
commit
839f7c763c
2 changed files with 49 additions and 0 deletions
35
rootfs.sh
35
rootfs.sh
|
|
@ -11,6 +11,12 @@ set -ex
|
|||
QEMU_CMD="${1:-qemu-system-x86_64}" # or 'chroot' or 'minikernel'
|
||||
QEMU_RAM="${2:-8G}"
|
||||
|
||||
GITDIR="$PWD/$(dirname "$0")"
|
||||
if [ ! -f 'rootfs.sh' ]; then
|
||||
echo 'must be run from base of repo'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd sysa
|
||||
|
||||
# SYSTEM A
|
||||
|
|
@ -21,6 +27,35 @@ sudo mount -t tmpfs -o size=8G tmpfs tmp
|
|||
|
||||
LOGFILE="$PWD/tmp/bootstrap.log"
|
||||
|
||||
wget()
|
||||
{
|
||||
local url="$1"
|
||||
local dir="${CACHEDIR:-$GITDIR/sources}"
|
||||
local file
|
||||
|
||||
file=$(basename "$url")
|
||||
mkdir -p "$dir"
|
||||
|
||||
test -s "$dir/$file" || command wget -O "$dir/$file" "$url"
|
||||
cp -v "$dir/$file" .
|
||||
checksum_do "$dir" "$file"
|
||||
}
|
||||
|
||||
checksum_do()
|
||||
{
|
||||
local dir="$1"
|
||||
local file="$2"
|
||||
local line
|
||||
local store="$GITDIR/SHA256SUMS.sources"
|
||||
|
||||
if line=$(grep "[[:space:]][[:space:]]$file"$ "$store"); then
|
||||
(cd "$dir" && echo "$line" | sha256sum -c)
|
||||
else
|
||||
echo 'Checksum mismatch or not found!'
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# base: mescc-tools-seed
|
||||
# copy in all the mescc-tools-seed stuff
|
||||
cp -r mescc-tools-seed/src/mescc-tools-seed/x86/* tmp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue