diff options
Diffstat (limited to 'getmock')
-rwxr-xr-x | getmock | 572 |
1 files changed, 445 insertions, 127 deletions
@@ -8,6 +8,8 @@ case $1 in ;; *x) dep=${1%x} ;; +*a) dep=${1%a} + ;; *) dep=$1 ;; esac @@ -15,6 +17,18 @@ esac rep=${2-remi} case $dep in +scl83el*) dep=${dep#scl83el} + type=enterprise + ;; +scl82el*) dep=${dep#scl82el} + type=enterprise + ;; +scl81el*) dep=${dep#scl81el} + type=enterprise + ;; +scl80el*) dep=${dep#scl80el} + type=enterprise + ;; scl74el*) dep=${dep#scl74el} type=enterprise ;; @@ -39,8 +53,48 @@ scl55el*) dep=${dep#scl55el} scl54el*) dep=${dep#scl54el} type=enterprise ;; -el8x72) - dep=8 +el?x55) + dep=${1:2:1} + if [ "$2" == "php55" -o "$2" == "test55" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php55 + else rep=${2}55 + fi + type=enterprise + ;; +el?x56) + dep=${1:2:1} + if [ "$2" == "php56" -o "$2" == "test56" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php56 + else rep=${2}56 + fi + type=enterprise + ;; +el?x70) + dep=${1:2:1} + if [ "$2" == "php70" -o "$2" == "test70" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php70 + else rep=${2}70 + fi + type=enterprise + ;; +el?x71) + dep=${1:2:1} + if [ "$2" == "php71" -o "$2" == "test71" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php71 + else rep=${2}71 + fi + type=enterprise + ;; +el??72) + dep=${1:2:1} if [ "$2" == "php72" -o "$2" == "test72" ] then rep=$rep elif [ "$2" == "remi" ] @@ -49,8 +103,8 @@ el8x72) fi type=enterprise ;; -el8x73) - dep=8 +el??73) + dep=${1:2:1} if [ "$2" == "php73" -o "$2" == "test73" ] then rep=$rep elif [ "$2" == "remi" ] @@ -59,8 +113,8 @@ el8x73) fi type=enterprise ;; -el8x74) - dep=8 +el??74) + dep=${1:2:1} if [ "$2" == "php74" -o "$2" == "test74" ] then rep=$rep elif [ "$2" == "remi" ] @@ -69,12 +123,114 @@ el8x74) fi type=enterprise ;; +el??80) + dep=${1:2:1} + if [ "$2" == "php80" -o "$2" == "test80" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php80 + else rep=${2}80 + fi + type=enterprise + ;; +el??81) + dep=${1:2:1} + if [ "$2" == "php81" -o "$2" == "test81" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php81 + else rep=${2}81 + fi + type=enterprise + ;; +el??82) + dep=${1:2:1} + if [ "$2" == "php82" -o "$2" == "test82" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php82 + else rep=${2}82 + fi + type=enterprise + ;; +el??83) + dep=${1:2:1} + if [ "$2" == "php83" -o "$2" == "test83" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php83 + else rep=${2}83 + fi + type=enterprise + ;; +fc???74) + dep=${1:2:2} + if [ "$2" == "php74" -o "$2" == "test74" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php74 + else rep=${2}74 + fi + type=fedora + ;; +fc???80) + dep=${1:2:2} + if [ "$2" == "php80" -o "$2" == "test80" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php80 + else rep=${2}80 + fi + type=fedora + ;; +fc???81) + dep=${1:2:2} + if [ "$2" == "php81" -o "$2" == "test81" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php81 + else rep=${2}81 + fi + type=fedora + ;; +fc???82) + dep=${1:2:2} + if [ "$2" == "php82" -o "$2" == "test82" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php82 + else rep=${2}82 + fi + type=fedora + ;; +fc???83) + dep=${1:2:2} + if [ "$2" == "php83" -o "$2" == "test83" ] + then rep=$rep + elif [ "$2" == "remi" ] + then rep=php83 + else rep=${2}83 + fi + type=fedora + ;; el*) dep=${dep#el} type=enterprise ;; fc*) dep=${dep#fc} type=fedora ;; +scl83fc*) dep=${dep#scl83fc} + type=fedora + ;; +scl82fc*) dep=${dep#scl82fc} + type=fedora + ;; +scl81fc*) dep=${dep#scl81fc} + type=fedora + ;; +scl80fc*) dep=${dep#scl80fc} + type=fedora + ;; scl74fc*) dep=${dep#scl74fc} type=fedora ;; @@ -141,6 +297,31 @@ do ;; thunderbird-debuginfo*) echo " " $i ignored ;; + remi-crypto*el8*) echo " " $i ignored + ;; + remi-crypto*el9*) + if [ -f priv/el9.x86_64/$j ]; then + echo " " $i already there + else + cp $i priv/el9.x86_64 && echo + $i copied priv EL9 + fi + ;; + remi-crypto*fc40*) + if [ -f priv/fc40.x86_64/$j ]; then + echo " " $i already there + else + cp $i priv/fc40.x86_64 && echo + $i copied priv FC40 + fi + ;; + *-debuginfo-*aarch64.rpm|*-debugsource-*aarch64.rpm) + if [ -f ${debug}aarch64/$j ]; then + echo " " $i already there + elif [ -d ${debug}aarch64 ]; then + cp $i ${debug}aarch64 && echo + $i copied debuginfo aarch64 + else + echo " " $i ignored + fi + ;; *-debuginfo-*x86_64.rpm|*-debugsource-*x86_64.rpm) if [ -f ${debug}x86_64/$j ]; then echo " " $i already there @@ -170,9 +351,6 @@ do [ -d ${cible}ppc64 -a ! -f ${cible}ppc64/.closed ] \ && ln ${cible} /$j ${cible}ppc64/$j \ && echo + $i linked ppc64 - [ -d ${cible}i386 ] \ - && ln ${cible}x86_64/$j ${cible}i386/$j \ - && echo + $i linked x86_64 [ -d ${cible}armhfp ] \ && ln ${cible}x86_64/$j ${cible}armhfp/$j \ && echo + $i linked armhfp @@ -188,6 +366,13 @@ do cp $i ${cible}i386 && echo + $i copied i686 fi ;; + *.aarch64.rpm) + if [ -f ${cible}aarch64/$j ]; then + echo " " $i already there + else + cp $i ${cible}aarch64 && echo + $i copied aarch64 + fi + ;; *.x86_64.rpm) if [ -f ${cible}x86_64/$j ]; then echo " " $i already there @@ -206,7 +391,12 @@ if [ $# = 0 ]; then exit 1 fi +echo -e "\n\n\n---------------------------------------\n\n\n" + opt=remi +if [ $1 = remi ]; then + shift +fi if [ $1 = test ]; then opt=test shift @@ -227,44 +417,24 @@ if [ $1 = test72 ]; then opt=test72 shift fi -if [ $1 = php55 ]; then - opt=php55 +if [[ $1 = php* ]]; then + opt=$i shift fi -if [ $1 = php56 ]; then - opt=php56 +if [[ $1 == glpi* ]]; then + opt=$1 shift fi -if [ $1 = php70 ]; then - opt=php70 +if [[ $1 == redis* ]]; then + opt=$1 shift fi -if [ $1 = php71 ]; then - opt=php71 +if [[ $1 == memcached ]]; then + opt=$1 shift fi -if [ $1 = php72 ]; then - opt=php72 - shift -fi -if [ $1 = php73 ]; then - opt=php73 - shift -fi -if [ $1 = glpi91 ]; then - opt=glpi91 - shift -fi -if [ $1 = glpi92 ]; then - opt=glpi92 - shift -fi -if [ $1 = glpi93 ]; then - opt=glpi93 - shift -fi -if [ $1 = glpi94 ]; then - opt=glpi94 +if [[ $1 == composer* ]]; then + opt=$1 shift fi if [ $1 = devs -o $1 = dev ]; then @@ -272,189 +442,337 @@ if [ $1 = devs -o $1 = dev ]; then shift fi -if [ $1 = all ]; then - for i in 29 30 - do - getOneMock fc${i}i $opt - done - for i in 6 - do - getOneMock el${i}i $opt - done -elif [ $1 = all55 ]; then - for n in 6 - do - getOneMock el${n}i php55 '*5.5*' - getOneMock el${n}x php55 '*5.5*' - done +if [ $1 = all55 ]; then n=7 - getOneMock el${n}x php55 '*5.5*' + getOneMock el${n}x55 php55 '*5.5*' elif [ $1 = all56 ]; then - for n in 6 - do - getOneMock el${n}i php56 '*5.6*' - getOneMock el${n}x php56 '*5.6*' - done n=7 - getOneMock el${n}x php56 '*5.6*' + getOneMock el${n}x56 php56 '*5.6*' elif [ $1 = all70 ]; then [ $opt = remi ] && opt=php70 [ $opt = test ] && opt=test70 - n=6 - getOneMock el${n}i $opt '*7.0*' - getOneMock el${n}x $opt '*7.0*' n=7 - getOneMock el${n}x $opt '*7.0*' + getOneMock el${n}x70 $opt '*7.0*' elif [ $1 = all71 ]; then [ $opt = remi ] && opt=php71 [ $opt = test ] && opt=test71 - n=6 - getOneMock el${n}i $opt '*7.1*' - getOneMock el${n}x $opt '*7.1*' n=7 - getOneMock el${n}x $opt '*7.1*' + getOneMock el${n}x71 $opt '*7.1*' elif [ $1 = all72 ]; then [ $opt = remi ] && opt=php72 [ $opt = test ] && opt=test72 - n=6 - getOneMock el${n}i $opt '*7.2*' - getOneMock el${n}x $opt '*7.2*' - getOneMock el7x $opt '*7.2*' + getOneMock el7x72 $opt '*7.2*' getOneMock el8x72 $opt '*7.2*' + getOneMock el8a72 $opt '*7.2*' elif [ $1 = all73 ]; then [ $opt = remi ] && opt=php73 [ $opt = test ] && opt=test73 - for n in 29 - do - getOneMock fc${n}i $opt '*7.3*' - getOneMock fc${n}x $opt '*7.3*' - done - n=6 - getOneMock el${n}i $opt '*7.3*' - getOneMock el${n}x $opt '*7.3*' - getOneMock el7x $opt '*7.3*' + getOneMock el7x73 $opt '*7.3*' getOneMock el8x73 $opt '*7.3*' + getOneMock el8a73 $opt '*7.3*' elif [ $1 = all74 ]; then [ $opt = remi ] && opt=php74 [ $opt = test ] && opt=test74 - for n in 29 30 - do - getOneMock fc${n}i $opt '*7.4*' - getOneMock fc${n}x $opt '*7.4*' - done - getOneMock fc31x $opt '*7.4*' - getOneMock el7x $opt '*7.4*' + getOneMock fc38x74 $opt '*7.4*' + getOneMock fc39x74 $opt '*7.4*' + getOneMock fc39a74 $opt '*7.4*' + getOneMock fc40x74 $opt '*7.4*' + getOneMock fc40a74 $opt '*7.4*' + getOneMock el7x74 $opt '*7.4*' getOneMock el8x74 $opt '*7.4*' + getOneMock el8a74 $opt '*7.4*' + getOneMock el9x74 $opt '*7.4*' + getOneMock el9a74 $opt '*7.4*' + +elif [ $1 = all80 ]; then + [ $opt = remi ] && opt=php80 + [ $opt = test ] && opt=test80 + getOneMock fc38x80 $opt '*8.0*' + getOneMock fc39x80 $opt '*8.0*' + getOneMock fc39a80 $opt '*8.0*' + getOneMock fc40x80 $opt '*8.0*' + getOneMock fc40a80 $opt '*8.0*' + getOneMock el7x80 $opt '*8.0*' + getOneMock el8x80 $opt '*8.0*' + getOneMock el8a80 $opt '*8.0*' + getOneMock el9x80 $opt '*8.0*' + getOneMock el9a80 $opt '*8.0*' + +elif [ $1 = all81 ]; then + [ $opt = remi ] && opt=php81 + [ $opt = test ] && opt=test81 + getOneMock fc38x81 $opt '*8.1*' + getOneMock fc39x81 $opt '*8.1*' + getOneMock fc39a81 $opt '*8.1*' + getOneMock fc40x81 $opt '*8.1*' + getOneMock fc40a81 $opt '*8.1*' + getOneMock el7x81 $opt '*8.1*' + getOneMock el8x81 $opt '*8.1*' + getOneMock el8a81 $opt '*8.1*' + getOneMock el9x81 $opt '*8.1*' + getOneMock el9a81 $opt '*8.1*' + +elif [ $1 = all82 ]; then + [ $opt = remi ] && opt=php82 + [ $opt = test ] && opt=test82 + getOneMock fc38x82 $opt '*8.2*' + getOneMock fc39x82 $opt '*8.2*' + getOneMock fc39a82 $opt '*8.2*' + getOneMock fc40x82 $opt '*8.2*' + getOneMock fc40a82 $opt '*8.2*' + getOneMock el7x82 $opt '*8.2*' + getOneMock el8x82 $opt '*8.2*' + getOneMock el8a82 $opt '*8.2*' + getOneMock el9x82 $opt '*8.2*' + getOneMock el9a82 $opt '*8.2*' + +elif [ $1 = all83 ]; then + [ $opt = remi ] && opt=php83 + [ $opt = test ] && opt=test83 + getOneMock fc38x83 $opt '*8.3*' + getOneMock fc39x83 $opt '*8.3*' + getOneMock fc39a83 $opt '*8.3*' + getOneMock fc40x83 $opt '*8.3*' + getOneMock fc40a83 $opt '*8.3*' + getOneMock el7x83 $opt '*8.3*' + getOneMock el8x83 $opt '*8.3*' + getOneMock el8a83 $opt '*8.3*' + getOneMock el9x83 $opt '*8.3*' + getOneMock el9a83 $opt '*8.3*' + +elif [ $1 = allr60 ]; then + opt=remi + getOneMock el7x $opt '*6.0*' + opt=redis60 + getOneMock fc38x $opt '*6.0*' + getOneMock fc39x $opt '*6.0*' + getOneMock fc39a $opt '*6.0*' + getOneMock fc40x $opt '*6.0*' + getOneMock fc40a $opt '*6.0*' + getOneMock el8x $opt '*6.0*' + getOneMock el8a $opt '*6.0*' + getOneMock el9x $opt '*6.0*' + getOneMock el9a $opt '*6.0*' + +elif [ $1 = allr62 ]; then + opt=remi + getOneMock el7x $opt '*6.2*' + opt=redis62 + getOneMock fc38x $opt '*6.2*' + getOneMock fc39x $opt '*6.2*' + getOneMock fc39a $opt '*6.2*' + getOneMock fc40x $opt '*6.2*' + getOneMock fc40a $opt '*6.2*' + getOneMock el8x $opt '*6.2*' + getOneMock el8a $opt '*6.2*' + getOneMock el9x $opt '*6.2*' + getOneMock el9a $opt '*6.2*' + +elif [ $1 = allr70 ]; then + opt=remi + getOneMock el7x $opt '*7.0*' + opt=redis70 + getOneMock fc38x $opt '*7.0*' + getOneMock fc39x $opt '*7.0*' + getOneMock fc39a $opt '*7.0*' + getOneMock fc40x $opt '*7.0*' + getOneMock fc40a $opt '*7.0*' + getOneMock el8x $opt '*7.0*' + getOneMock el8a $opt '*7.0*' + getOneMock el9x $opt '*7.0*' + getOneMock el9a $opt '*7.0*' + +elif [ $1 = allr72 ]; then + opt=remi + getOneMock el7x $opt '*7.2*' + opt=redis72 + getOneMock fc38x $opt '*7.2*' + getOneMock fc39x $opt '*7.2*' + getOneMock fc39a $opt '*7.2*' + getOneMock fc40x $opt '*7.2*' + getOneMock fc40a $opt '*7.2*' + getOneMock el8x $opt '*7.2*' + getOneMock el8a $opt '*7.2*' + getOneMock el9x $opt '*7.2*' + getOneMock el9a $opt '*7.2*' + +elif [ $1 = allm ]; then + opt=remi + getOneMock el7x $opt '*1.6*' + getOneMock el8x $opt '*1.6*' + opt=memcached + getOneMock fc38x $opt '*1.6*' + getOneMock fc39x $opt '*1.6*' + getOneMock fc39a $opt '*1.6*' + getOneMock fc40x $opt '*1.6*' + getOneMock fc40a $opt '*1.6*' + getOneMock el9x $opt '*1.6*' + getOneMock el9a $opt '*1.6*' elif [ $1 = all54 ]; then - for n in 6 - do - getOneMock el${n}i remi '*5.4*' - getOneMock el${n}x remi '*5.4*' - done n=7 getOneMock el${n}x remi '*5.4*' elif [ $1 = for56 ]; then - for i in 6 7 + for i in 7 do getOneMock el${i}x test done elif [ $1 = for55 ]; then - for i in 6 7 + for i in 7 do getOneMock el${i}x test done elif [ $1 = allx ]; then - for i in 29 30 31 + for i in 38 39 40 do getOneMock fc${i}x $opt done - for i in 6 7 8 + for i in 7 8 9 do getOneMock el${i}x $opt done +elif [ $1 = alla ]; then + for i in 39 40 + do + getOneMock fc${i}a $opt + done + for i in 8 9 + do + getOneMock el${i}a $opt + done + elif [ $1 = scl54 ]; then - for i in 6 7 + for i in 7 do getOneMock scl54el${i}x $opt done elif [ $1 = scl55 ]; then - for i in 6 7 + for i in 7 do getOneMock scl55el${i}x $opt done elif [ $1 = scl56 ]; then - for i in 29 30 31 - do - getOneMock scl56fc${i}x $opt - done - for i in 6 7 8 + for i in 7 8 do getOneMock scl56el${i}x $opt done elif [ $1 = scl70 ]; then - for i in 29 30 31 - do - getOneMock scl70fc${i}x $opt - done - for i in 6 7 8 + for i in 7 8 do getOneMock scl70el${i}x $opt done elif [ $1 = scl71 ]; then - for i in 29 30 31 + for i in 7 8 + do + getOneMock scl71el${i}x $opt + done + +elif [ $1 = scl83 ]; then + for i in fc38 fc39 fc40 el7 el8 el9 do - getOneMock scl71fc${i}x $opt + getOneMock scl83${i}x $opt done - for i in 6 7 8 + getOneMock scl83fc39a $opt + getOneMock scl83fc40a $opt + getOneMock scl83el8a $opt + getOneMock scl83el9a $opt + +elif [ $1 = scl82 ]; then + for i in 38 39 40 do - getOneMock scl71el${i}x $opt + getOneMock scl82fc${i}x $opt done + getOneMock scl82fc39a $opt + getOneMock scl82fc40a $opt + for i in 7 8 9 + do + getOneMock scl82el${i}x $opt + done + getOneMock scl82el8a $opt + getOneMock scl82el9a $opt + +elif [ $1 = scl81 ]; then + for i in 38 39 40 + do + getOneMock scl81fc${i}x $opt + done + getOneMock scl81fc39a $opt + getOneMock scl81fc40a $opt + for i in 7 8 9 + do + getOneMock scl81el${i}x $opt + done + getOneMock scl81el8a $opt + getOneMock scl81el9a $opt + +elif [ $1 = scl80 ]; then + for i in 38 39 40 + do + getOneMock scl80fc${i}x $opt + done + getOneMock scl80fc39a $opt + getOneMock scl80fc40a $opt + for i in 7 8 9 + do + getOneMock scl80el${i}x $opt + done + getOneMock scl80el8a $opt + getOneMock scl80el9a $opt elif [ $1 = scl74 ]; then - for i in 29 30 31 + for i in 38 39 40 do getOneMock scl74fc${i}x $opt done - for i in 7 8 + getOneMock scl74fc39a $opt + getOneMock scl74fc40a $opt + for i in 7 8 9 do getOneMock scl74el${i}x $opt done + getOneMock scl74el8a $opt + getOneMock scl74el9a $opt elif [ $1 = scl73 ]; then - for i in 29 30 31 - do - getOneMock scl73fc${i}x $opt - done - for i in 6 7 8 + for i in 7 8 do getOneMock scl73el${i}x $opt done + getOneMock scl73el8a $opt elif [ $1 = scl72 ]; then - for i in 29 30 31 - do - getOneMock scl72fc${i}x $opt - done - for i in 6 7 8 + for i in 7 8 do getOneMock scl72el${i}x $opt done - + getOneMock scl72el8a $opt + +elif [ $1 = allphp ]; then + LOG=$(mktemp out.XXXXXXXXXX) + MOD="all54 all55 all56 all70 all71 all72 all73 all74 all80 all81 all82 all83" + SCL="scl54 scl55 scl56 scl70 scl71 scl72 scl73 scl74 scl80 scl81 scl82 scl83" + for i in $SCL $MOD + do $0 $opt $i | tee $LOG + if grep -q '64\.rpm' $LOG && grep -q 'Aucun' $LOG + then + echo -en "\n> $i - [enter] >"; read rep + fi + done + rm -f $LOG else for i in $* do |