[UPDATE] - full test

This commit is contained in:
Guillaume Astier
2021-12-12 13:59:57 +01:00
parent c2f29a05fd
commit e814fd3c82
9 changed files with 49 additions and 29 deletions
+3 -1
View File
@@ -1,12 +1,14 @@
#!/bin/bash
RmEnv() {
rm -Rf ${Wai}/ESL/.Prefetch/
rm -Rf ${Wai}/Workspace/*
}
Wai=$(realpath $(dirname $0))
Wai=/data/
cd ${Wai}/ESL/GenELMU/
source ${Wai}/ESL/setenv.sh
Regular → Executable
View File
+21 -17
View File
@@ -10,6 +10,7 @@ Res() {
else
echo "$(tput setaf 1)FAILED$(tput sgr0)"
fi
Tot=$((Tot+$1))
}
@@ -22,6 +23,7 @@ WhileTrue() {
}
Tot=0
[[ $1 == "debug" ]] && WhileTrue
[[ $1 == "del" ]] && rm -Rf /data/repo /data/log
@@ -30,6 +32,24 @@ WhileTrue() {
[[ ! -d /data/repo ]] && mkdir -p /data/repo
echo -n "Get epel : "
Repo=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
Res $?
echo -n "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
Res $?
echo -n "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
Res $?
echo -n "Get OS BASE : "
mkdir /data/repo/tmp/
cd /data/repo/tmp/
@@ -53,21 +73,5 @@ mv /data/repo/tmp/mirror.centos.org/centos/7.9.2009/updates/x86_64/ /data/repo/C
rm -Rf /data/repo/tmp/
echo -n "Get epel : "
Repo=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
Res $?
for var in $(find /data/repo/epel/ -name *rpm) ; do mv $var /data/repo/epel/Packages/; done
echo -n "Create repo epel : "
cd /data/repo/epel
createrepo -v /data/repo/epel 2>&1 | tee /data/log/CreateRepo_${Repo}.log &> /dev/null
Res $?
echo -n "Move EPEL : "
mkdir -p /data/repo/EPEL/el7/x86_64/ &&
mv /data/repo/epel/* /data/repo/EPEL/el7/x86_64/ &&
rmdir /data/repo/epel/
Res $?
exit $Tot