Skip to content

Instantly share code, notes, and snippets.

@patsevanton
Created August 8, 2018 06:33
Show Gist options
  • Save patsevanton/f4bfc07d47d0008765a7525c8c00d692 to your computer and use it in GitHub Desktop.
Save patsevanton/f4bfc07d47d0008765a7525c8c00d692 to your computer and use it in GitHub Desktop.
reposync_mapnik.sh
#!/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