diff --git a/build_base_image_70.sh b/bin/build_base_image_70.sh similarity index 100% rename from build_base_image_70.sh rename to bin/build_base_image_70.sh diff --git a/bin/build_base_image_diya.sh b/bin/build_base_image_diya.sh new file mode 100755 index 0000000..3552846 --- /dev/null +++ b/bin/build_base_image_diya.sh @@ -0,0 +1,37 @@ +#! /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=$(realpath "$(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/" +cp -rf "$W"/fonts "$BASE_DIR"/tmp/ +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 +cp -rf "$W/fonts" "$BASE_DIR/builder/" + +$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 diff --git a/bin/diya b/bin/diya new file mode 100755 index 0000000..46f1ec5 --- /dev/null +++ b/bin/diya @@ -0,0 +1,97 @@ +#! /bin/bash +set -e + +W=$(dirname "$(realpath "$0")") + +diya_help() { + cat << EOF + Usage: diya