1
0
mirror of https://github.com/lxsang/DiyaSDK.git synced 2024-11-16 18:18:22 +01:00
DiyaSDK/build_base_image_diya.sh

38 lines
1.0 KiB
Bash
Raw Normal View History

2022-02-15 22:08:44 +01:00
#! /bin/bash
set -e
[ -z "$1" ] && echo "Please specify 32 or 64 bits architectuure" && exit 1
echo "[Compiler] Adding more Kernel packages"
ARCH="$1"
W=$(dirname `realpath $0`)
BASE_DIR="$W/$ARCH"
rm "$BASE_DIR/tmp" -rf
mkdir -p "$BASE_DIR/tmp/"
cp $BASE_DIR/bootstrap/bootstrap.image $BASE_DIR/tmp/diya.image
cp $W/unicode/* $BASE_DIR/tmp/
2022-03-04 20:45:12 +01:00
cp -rf $W/fonts $BASE_DIR/tmp/
2022-02-15 22:08:44 +01:00
VM=$BASE_DIR/builder/pharo
IMG=$BASE_DIR/tmp/diya.image
SRC_IMG=$BASE_DIR/builder/Pharo.image
if [ ! -e "$SRC_IMG" ]; then
mkdir -p "$BASE_DIR/builder/"
cd "$BASE_DIR/builder/"
curl https://get.pharo.org/$ARCH/70+vm | bash
cd $W
fi
2022-03-04 20:45:12 +01:00
cp -rf $W/fonts $BASE_DIR/builder/
2022-02-15 22:08:44 +01:00
$VM $SRC_IMG $W/install.st --quit
NAME="Diya-Bootstrap"
$VM $SRC_IMG $W/export.st "$BASE_DIR/tmp" "$NAME" --quit
echo "Creating image...."
$VM $IMG
$VM $IMG loadHermes $BASE_DIR/bootstrap/Hermes-Extensions.hermes \
$BASE_DIR/bootstrap/TraitsV2.hermes \
$BASE_DIR/tmp/$NAME.hermes --on-duplication=ignore \
--no-fail-on-undeclared --save --quit
#init the image
$VM $IMG init --save