Commit f6cfbba4 authored by Alessandro Elias's avatar Alessandro Elias
Browse files

Change name of the main script.


Signed-off-by: Alessandro Elias's avatarAlessandro Elias <ae11@c3sl.ufpr.br>
parent 859102ea
#!/bin/bash
#
# Copyright (C) 2017 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of create-iso
#
# le6-conf is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
set -x
if [ "$(id -u)" != "0" ]; then
echo You must have more power to run this script
exit -1
fi
if [ $# -ne 1 ]; then
echo "Usage: $0 [dist]"
exit 1
fi
if [ "$1" == '--help' ]; then
echo "Usage: $0 [dist]"
exit 2
fi
_DIST=$1
export PREFIX=$(pwd)
source "${PREFIX}/conf/$_DIST/create-iso.conf" \
|| log ERROR "configuration file not found for dist: \"${_DIST}\""
source common.sh
TIME_STAMP="`date +'%Y-%m-%dT%H:%M:%S'`"
LOG_FILE="${LOG_PATH}/create-iso-${TIME_STAMP}.log"
mkdir -p ${TMP}
sudo apt-get install syslinux squashfs-tools genisoimage xorriso \
|| log ERROR "Failed to install basic tools: \"${_DIST}\""
for file in $(ls ${SCRIPTSDIR}); do
if [ -x "${SCRIPTSDIR}/${file}" ] && egrep -q '^[0-9]{2}-[a-z-]+' <<< "$file"; then
echo "$file"
if ! "${SCRIPTSDIR}/${file}"\
${_DIST} \
${CHROOTDIR} \
${CHROOTFILE} \
${DISTRO} \
${DPLIST} \
${INSTLIST} \
${ISOLINUX} \
${MOUNTLIST} \
${OURSOURCESLIST} \
${RMDSKT} \
${RMLIST} \
${SCRIPTSDIR} \
${SHORTNAME} \
${SOURCESLISTDEFAULT} \
${TMP} \
${LOG_FILE}; then
log ERROR "While running \"${SCRIPTSDIR}/${file}\""
fi
fi
done
NAME="LinuxEducacional6-$(echo ${_DIST} | cut -d'/' -f2).iso"
cd ${TMP}/image
sudo xorriso -as mkisofs -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -no-emul-boot -isohybrid-gpt-basdat -o ${PREFIX}/iso/${_DIST}/${NAME} \
. ||\
log ERROR "Failed to generate iso image."
cd -
cleanTmpFiles
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment