#!/bin/bash
echo "Build started at $(date)"
PATH=/sbin:/bin:/usr/sbin:/usr/bin:.
export PATH
sudo rm -rf lunar-iso
git clone git@github.com:lunar-linux/lunar-iso.git
cd lunar-iso
corecount=$(grep processor /proc/cpuinfo | wc -l)
makecount=$[corecount*2]
cat >> conf/config << EOT
ISO_ARCH = $(arch)
ISO_MAJOR = 1.7.1
ISO_MINOR = $(date +testing-%Y%m%d)
ifeq (,\$(ISO_MINOR))
ISO_VERSION = \$(ISO_MAJOR)-\$(ISO_ARCH)
else
ISO_VERSION = \$(ISO_MAJOR)-\$(ISO_MINOR)-\$(ISO_ARCH)
endif
ISO_CODENAME = Mare Incognitum
ISO_BUILD = \$(ISO_ARCH)-pc-linux-gnu
ISO_CNAME = \$(ISO_VERSION) (\$(ISO_CODENAME) - \$(ISO_DATE))
ISO_LABEL = \$(shell echo -n Lunar-Linux \$(ISO_CODENAME) | tr '[:space:]' _)
ISO_LUNAR_MODULE = lunar
ISO_MAKES = ${makecount}
ISO_GCCARCH = $(arch)
EOT
sudo make || sudo make || sudo make
if [ -f *.iso ]
then
mkdir -p ../daily
cp *.iso ../daily
for i in ../daily/*.iso
do
if [ ! -f ${i}.sha256 ]
then
sha256sum $i > ${i}.sha256
fi
done
fi
echo "Build finished at $(date)"
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}