Created
August 8, 2018 06:33
-
-
Save patsevanton/f4bfc07d47d0008765a7525c8c00d692 to your computer and use it in GitHub Desktop.
reposync_mapnik.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
arr=( $(cat /etc/yum.repos.d/mapnik.repo | grep gpgkey | cut -f 2 -d "=" ) ) | |
for i in "${arr[@]}" | |
do | |
echo "$i" | |
rpm --import "$i" | |
done | |
arr1=( $(cat /etc/yum.repos.d/mapnik.repo | grep baseurl | cut -f 2 -d "=" ) ) | |
for y in "${arr1[@]}" | |
do | |
echo "$y" | |
echo "URL Repo" | |
repo_name="$( echo "$y" | sed "s/http:\/\/copr-be.cloud.fedoraproject.org\/results\/tartare\///g" | sed "s/\/epel-7-x86_64\///g" )" | |
echo "$repo_name" | |
echo "Repo Name" | |
reposync --gpgcheck -l --repoid=tartare-"$repo_name" --download_path=/var/www/mrepo/ | |
createrepo /var/www/mrepo/tartare-"$repo_name" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment