Commit 2cdf8055 authored by Adrian DC's avatar Adrian DC
Browse files

chore: run: adapt 'run.sh' to missing sudo and wine support

parent acb55f13
Loading
Loading
Loading
Loading
+8 −3
Changes for run.sh: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18,9 +18,14 @@ echo ''
# Execute job scripts
sed -n "/^'${JOB}.*':$/,/^$/{ /^  script:$/{ :a; n; /    - /{ s/^ *- //p; ba; } } }" ./.gitlab-ci.yml |
  while read -r line; do
    if [ "${OSTYPE}" = 'msys' ]; then
      line=${line//sudo /}
      line=${line//python3 /python }
    if ! type sudo >/dev/null 2>&1 || [ "${OSTYPE}" = 'msys' ]; then
      line=$(echo "${line}" | sed 's/sudo //g')
    fi
    if ! type python3 >/dev/null 2>&1 || [ "${OSTYPE}" = 'msys' ]; then
      line=$(echo "${line}" | sed 's/python3 /python /g')
    fi
    if ! type python >/dev/null 2>&1 && type wine >/dev/null 2>&1; then
      line=$(echo "${line}" | sed 's/python /wine python /g')
    fi
    echo "+ ${line}"
    sh -c "${line}"