[UPADTE] - compile esl porduit success git status !

This commit is contained in:
2022-10-20 17:09:11 +02:00
parent d4a41cf128
commit 66d98e5400
11 changed files with 78 additions and 51 deletions
+12 -6
View File
@@ -27,19 +27,25 @@ Download (){
tput sc
while [[ ! -z $(ps axf| grep reposync | grep -v grep) ]]
do
#DataCurr=$(MoveCurr $cpt)
read -r Curr cpt <<< $(MoveCurr $cpt)
#Curr=$(echo $DataCurr | cut -d" " -f1)
#cpt=$(echo $DataCurr | cut -d" " -f2)
Orpm=${Rpm}
OrpmName=$(basename ${Orpm:-/}| sed 's/-[0-9]/|/g' | cut -d"|" -f1)
Rpm=$(find $Rep -type f -name "*.rpm" -printf "%T@ %p\n" | sort -n | cut -d' ' -f 2- | tail -n 1)
RpmName=$(basename ${Rpm:-/}| sed 's/-[0-9]/|/g' | cut -d"|" -f1)
#Curr=$(MoveCurr $cpt)
Txt="Downloading ${RpmName:-/}"
if [[ "${RpmName}" == "$OrpmName" ]] && [[ "$RpmName" != "/" ]]
then
RpmSize=$(du -s $Rpm|awk '{print $1}')
OrpmSize=$(du -s $Orpm|awk '{print $1}')
[[ "$RpmSize" -eq "$OrpmSize" ]] && Txt="Sync - RPM Signature"
fi
[[ "$RpmName" != "/" ]] && Txt="Syncing metada"
tput rc; tput el
echo -ne "\r[${Curr}] - Downloading ${RpmName:-/}\r"
echo -ne "\r[${Curr}] - $Txt\r"
sleep 0.2
echo "DEBUG : $cpt $Curr" > /tmp/a
done
+12 -22
View File
@@ -4,16 +4,9 @@ function centos() {
Repo=epel
Action "Get epel" reposync -l --newest-only --delete --downloadcomps --download-metadata --repoid=${Repo} --download_path=/data/repo/ 2>&1 | tee /data/log/get_${Repo}.log &> /dev/null
Action "Move SeanAps EPEL : " mkdir -p /data/repo/EPEL/el7/x86_64/Packages ; for var in $(find /data/repo/epel/ -name *rpm -type f) ; do mv $var /data/repo/EPEL/el7/x86_64/Packages; done
Action "Create repo epel : " cd /data/repo/EPEL/el7/x86_64/ && createrepo -v /data/repo/EPEL/el7/x86_64/ 2>&1 | tee /data/log/CreateRepo_${Repo}.log &> /dev/null
Action "Get OS BASE : " mkdir -p /data/repo/tmp/ && cd /data/repo/tmp/ && wget -r -p -k http://mirror.centos.org/centos/7.9.2009/os/x86_64/ 2>&1 | tee /data/log/get_base.log
for var in $(find .| grep index.html) ;do rm -f $var;done
mkdir -p /data/repo/CentOS/7.9/os/
@@ -22,10 +15,6 @@ function centos() {
rm -rf /data/repo/tmp/*
Action "Get OS updates : " cd /data/repo/tmp/ && wget -r -p -k http://mirror.centos.org/centos/7.9.2009/updates/x86_64/ 2>&1 | tee /data/log/get_updates.log &> /dev/null
#Action "Clean" for var in $(find . | grep index.html) ;do rm -f $var;done && mkdir -p /data/repo/CentOS/7.9/updates && mv /data/repo/tmp/mirror.centos.org/centos/7.9.2009/updates/x86_64/ /data/repo/CentOS/7.9/updates/ && rm -Rf /data/repo/tmp/
}
RunScreen (){
@@ -42,19 +31,20 @@ function oraclelinux () {
Majeur=$(echo ${osversion} | cut -d"." -f1)
Mineur=$(echo ${osversion} | cut -d"." -f2)
Action "Create Dir ${osversion}" mkdir -p /data/repo/OracleLinux/${osversion}/
RunScreen appstream dnf reposync -g --newest-only --exclude='*.src' -p /data/repo/OracleLinux/${osversion}/ --download-metadata --repoid=ol${Majeur}_appstream
Download /data/repo/OracleLinux/${osversion}/
Action "Move SeaNaps environement" mv /data/repo/OracleLinux/${osversion}/ol${Majeur}_appstream /data/repo/OracleLinux/${osversion}/appstream
Action "Create BIN environement" mkdir -p /data/repo/OracleLinux/${osversion}/appstream/x86_64
Action "Move data rpm in BIN environtment" mv /data/repo/OracleLinux/${osversion}/appstream/{getPackage,repodata} /data/repo/OracleLinux/${osversion}/appstream/x86_64
test -L /data/repo/OracleLinux/${osversion}/appstream/x86_64 && Action "Delete Old Link" rm /data/repo/OracleLinux/${osversion}/appstream/x86_64
Action "Create Dir ${osversion}" mkdir -p /data/repo/OracleLinux/${osversion}/appstream/
RunScreen appstream dnf reposync -g --newest-only --exclude='*.src' -p /data/repo/OracleLinux/${osversion}/appstream/ --download-metadata --repoid=ol${Majeur}_appstream
Download /data/repo/OracleLinux/${osversion}/appstream/
Action "Get in ${osversion} appstream" cd /data/repo/OracleLinux/${osversion}/appstream/
Action "Link SeaNaps environement appstream" ln -s ol${Majeur}_appstream x86_64
Action "Create Dir ${osversion}" mkdir -p /data/repo/OracleLinux/${osversion}/
RunScreen appstream dnf reposync -g --newest-only --exclude='*.src' -p /data/repo/OracleLinux/${osversion}/ --download-metadata --repoid=ol${Majeur}_u${Mineur}_baseos_base
test -L /data/repo/OracleLinux/${osversion}/baseos/latest/x86_64 && Action "Delete Old Link" rm /data/repo/OracleLinux/${osversion}/baseos/latest/x86_64
Download /data/repo/OracleLinux/${osversion}/
Action "Move SeaNaps environement" mv /data/repo/OracleLinux/${osversion}/baseos/latest/x86_64/*/{getPackage,repodata} /data/repo/OracleLinux/${osversion}/baseos/latest/x86_64/
Action "Create Dir ${osversion}" mkdir -p /data/repo/OracleLinux/${osversion}/baseos/latest
RunScreen appstream dnf reposync -g --newest-only --exclude='*.src' -p /data/repo/OracleLinux/${osversion}/baseos/latest --download-metadata --repoid=ol${Majeur}_u${Mineur}_baseos_base
Download /data/repo/OracleLinux/${osversion}/baseos
Action "Get in ${osversion} baseos" cd /data/repo/OracleLinux/${osversion}/baseos/latest
Action "Link SeaNaps environement baseOS" ln -s ol${Majeur}_u${Mineur}_baseos_base x86_64
}
+11 -1
View File
@@ -2,12 +2,22 @@
usage() {
echo "No cible is present in /data/"
exit
}
RmEnv() {
rm -Rf ${Wai}/ESL/.Prefetch/
rm -Rf ${Wai}/Workspace/*
}
Wai=/data/
Wai=/data/cible
[[ ! -d $Wai ]] && usage
cd ${Wai}/ESL/GenELMU/
View File