1234567891011121314151617181920212223 |
- #!/bin/bash
- curPWD=$PWD
- cd $(dirname $0)
- export gbs_root=$(echo $PWD | sed "s/\/usr\/bin\/host-tools$//gi")
- cd $curPWD
- escapedArgs=""
- for i in $(seq 1 ${#}); do
- if [[ "${!i}" =~ "GBS_SOURCE_DIR="* ]]; then
- sourceDir=$(echo "${!i}" | cut -c 16-)
- cd "$sourceDir"
- mountSourceDir="--mount $PWD"
- cd $curPWD
- else
- escapedArgs="$escapedArgs \"${!i}\""
- fi
- done
- echo "cd $PWD; cmake $escapedArgs" | gbs chroot --silent --mount $PWD $mountSourceDir $gbs_root
|