#!/bin/bash # $1 fedora or centos # $2 version if [ $# -lt 1 ]; then echo 'Usage: ./add_repo.sh {fedora|centos} version' exit 127 fi olddir=$(pwd) cd $1 mkdir $2 cd $2 mkdir {SRPMS,x86_64} mkdir SRPMS/{0,3,6,7,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} mkdir x86_64/{0,3,6,7,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} cd $olddir ./update_repo.sh $1/$2 ./update_index.sh