create_qt_rpms_repo 447 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -e
  3. function usage {
  4. echo "$0 pathToBuildWithGbsRpms pathToTargetRepoDir archSubdir"
  5. }
  6. if [ $# -ne 3 ]; then
  7. echo "bad number of arguments"
  8. usage
  9. exit
  10. fi
  11. pathToBuildWithGbsRpms="$1"
  12. pathToTargetRepoDir=$2
  13. archSubDir=$3
  14. mkdir -p "$pathToTargetRepoDir/$archSubDir"
  15. cp "$pathToBuildWithGbsRpms"/*.rpm "$pathToTargetRepoDir/$archSubDir"
  16. CUR_DIR="$PWD"
  17. cd $pathToTargetRepoDir
  18. createrepo --update .
  19. cd $CUR_DIR