#!/bin/bash VERSION=7 REPO=privat ARCH=x86_64 OS=centos REPO_BASEDIR=/srv/download CACHE_BASEDIR=/var/cache/createrepo VARIABLE=$OS/$VERSION/$REPO/$ARCH CACHEDIR=$CACHE_BASEDIR/$VARIABLE REPO_DIR=$REPO_BASEDIR/$VARIABLE echo echo "<<< createrepo $VARIABLE >>>" echo chown root:root /srv/download/centos/7/privat/x86_64/Packages/*.rpm chmod 644 /srv/download/centos/7/privat/x86_64/Packages/*.rpm mkdir -p $CACHEDIR createrepo --cachedir $CACHEDIR --database --verbose $REPO_DIR