cmake 505 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. curPWD=$PWD
  3. cd $(dirname $0)
  4. export gbs_root=$(echo $PWD | sed "s/\/usr\/bin\/host-tools$//gi")
  5. cd $curPWD
  6. escapedArgs=""
  7. for i in $(seq 1 ${#}); do
  8. if [[ "${!i}" =~ "GBS_SOURCE_DIR="* ]]; then
  9. sourceDir=$(echo "${!i}" | cut -c 16-)
  10. cd "$sourceDir"
  11. mountSourceDir="--mount $PWD"
  12. cd $curPWD
  13. else
  14. escapedArgs="$escapedArgs \"${!i}\""
  15. fi
  16. done
  17. echo "cd $PWD; cmake $escapedArgs" | gbs chroot --silent --mount $PWD $mountSourceDir $gbs_root