Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- packageLoc='/path/to/packages'
- repoLoc='/path/to/repo'
- yum list $1 | grep $1
- if [ $? != 0 ];
- then
- echo 'Not available, adding to repo.'
- cp $packageLoc$1* $repoLoc
- createrepo $repoLoc
- echo $1 'Copied to repo.'
- else
- echo $1 'Already exists in the repo.'
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement