#!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Ensure we're in the root of the git repo. cd $DIR/.. # Check that we're trying to build with our own toolchain, # as it installs things to hdd/ and we're going to reset # that directory to a clean slate (which will lose, eg. # includes, libraries, etc.) if [[ $TOOLCHAIN/ = $PWD/* ]]; then echo "You should not try to build CD ISOs from your active" echo "development repository, as the process is destructive" echo "in its attempts to build small ramdisks." echo "" echo "Instead, create a new clone of your repository," echo "activate your development toolchain, and then run this" echo "script again." exit 1 fi BLACKLIST="userspace/tests/* hdd/usr/share/wallpapers/{grandcanyon,paris,southbay,yokohama,yosemite}.png" # Rebuild echo "Rebuilding... (ignore warnings about time skew, this is intentional)" eval rm $BLACKLIST touch -d tomorrow toaruos-disk.img make STRIP_LIBS=1 i686-pc-toaru-strip hdd/bin/* echo "Cloning CD source directory..." rm -rf cdrom cp -r util/cdrom cdrom mv hdd/mod cdrom/mod mkdir -p hdd/usr/share/terminfo/t cp util/toaru.tic hdd/usr/share/terminfo/t/toaru cat > hdd/home/local/.menu.desktop <