9,12 → 9,6 |
# Supported languages: fr;en |
# |
|
# Colors parameters |
RED='\033[0;31m' |
GREEN='\033[0;32m' |
YELLOW='\033[0;33m' |
NC='\033[0m' |
|
function print_percentage() { |
local percent=$1 |
if [ ${percent} -lt 5 ]; then |
181,8 → 175,6 |
mageiaNewDir=/tmp/mageia_new |
mageiaOfficialDir=/tmp/mageia_official |
|
|
|
# Mounting the image |
echo "Mounting the image..." |
[[ ! -d ${mageiaOfficialDir} ]] && mkdir ${mageiaOfficialDir} |
254,6 → 246,7 |
echo "Hit a Key to download complemmentary RPMs" |
read a |
|
# Dowloading additionnal RPM |
count=0 |
total=`echo $rpm_need_by_alcasar | wc -w` |
# Selecting & copying of rpm need by alcasar |
263,7 → 256,7 |
# Retreiving output of ls in directories |
fileInCore=$(ls ${coreDir} | grep "^${rpm}") |
fileInNonFree=$(ls ${nonFreeDir} | grep "^${rpm}") |
# we need to download icomplementary RPMS (that aren't in core nor in nonfree) |
# Download complementary RPMS (that aren't in core nor in nonfree) |
if [ -z ${fileInCore} ] && [ -z ${fileInNonFree} ]; then |
url=$(urpmq --ignorearch --sources ${rpm} | grep 'updates\|release' | uniq) |
wget -P "${RPMS_DIR}" "${url}" --quiet |
271,8 → 264,11 |
fi |
count=$(expr ${count} + 1) |
done |
tar -cvf ${actualDir}/alcasar.tar.gz ${RPMS_DIR}/ |
cp ${actualDir}/alcasar.tar.gz ${mageiaNewDir}/${arch}/install/alcasar |
$lcd=`pwd` |
cd ${RPMS_DIR} |
tar -cvf ${mageiaNewDir}/${arch}/install/alcasar/alcasar.tar ${RPMS_DIR}/ |
cd $lcd |
|
# Informations |
echo "$count complementary RPMs copied" |
echo "Hit a Key to create the ISO file" |