Files
start-os/build/make-image.sh
kn0wmad 8cff6e1cd0 Setup Scripts (#472)
* Init commit of setup scripts

* Minor edit

* Script edit and dir rename

* Oops

* Updated README

* Updated scripts/readme

* Additional Script/README updates

* Further Script updates

* BuildGuide updates

* More git fuckery

* Init commit of setup scripts

* Minor edit

* Script edit and dir rename

* Oops

* Updated scripts/readme

* Script/README updates

* Additional Script/README updates

* Script/README edits

* Copy script edit

* Copy script edit

* Filesystem script edit

* More edits

* Guide edit

* Makefile

* fixes ui build scripts to use submodules (#546)

* fix product key generation

Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Keagan McClelland <keagan.mcclelland@gmail.com>
2021-09-30 13:07:12 -06:00

19 lines
705 B
Bash
Executable File

#!/bin/bash
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
cd $DIR/..
truncate --size=$[(31116287+1)*512] eos.img
export OUTPUT_DEVICE=$(sudo losetup --show -fP eos.img)
export LOOPDEV=$(sudo losetup --show -fP ubuntu.img)
./build/partitioning.sh
./build/write-image.sh
sudo losetup -d $OUTPUT_DEVICE