void-mklive/cinnamon-x64.sh

60 lines
1.5 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
DESKTOP="cinnamon"
echo "========================="
echo "| ${DESKTOP} VOID x86_64 |"
echo " ------------------------"
2020-06-24 10:05:20 -07:00
CURRENT=https://mirrors.servercentral.com/voidlinux/current
MUTILIB=https://mirrors.servercentral.com/voidlinux/current/multilib
NONFREE=https://mirrors.servercentral.com/voidlinux/current/nonfree
FILENAME="void-live-${DESKTOP}-unofficial"
DATE=$(date +%Y%m%d)
KERNEL=$(uname -r)
BUILDDIR="$(pwd)/build"
2020-06-24 10:05:20 -07:00
retry=0
2020-06-24 10:05:20 -07:00
until [ -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];do
2020-06-24 10:05:20 -07:00
((retry++))
if [[ $retry -gt 2 ]];then
break
fi
sudo ./mklive.sh \
-a x86_64 \
-r "${CURRENT}" \
-r "${MULTILIB}" \
-p "$(grep '^[^#].' ${DESKTOP}-x64.packages)" \
-T "Void Linux ${DESKTOP} Unofficial" \
-o ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso
done
2019-11-19 00:48:57 -07:00
if [ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ];then
2020-06-24 10:05:20 -07:00
retries=${1}
until [[ $retries -gt 2 ]];do
echo "Retrying build ${retries}"
((retries++))
bash ${0} ${retries}
done
if [[ ! -f ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso ]];then
echo "Error: ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso : does not exist! Aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
2019-11-19 00:48:57 -07:00
fi
sha256sum ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso >> sha256sums.txt
2019-11-19 00:48:57 -07:00
if [ ! -f sha256sums.txt ];then
echo "Missing checksum file, aborting!"
echo "ERR=1" > error-status.txt
exit 1
fi
if [ ! -d "${BUILDDIR}" ];then
mkdir ${BUILDDIR}
fi
mv ${FILENAME}-x86_64-${KERNEL}-${DATE}.iso build