Skip to content
  • Sebastian Engel's avatar
    Update FirstRun.pm to let `kdesrc-run` call executables in subdirectories. · 1bf59885
    Sebastian Engel authored
    When a project source directory is located in a subdirectory of `kde/src/`,
    such as `kde/src/playground/utils/basket`, or `kde/src/kde/kdegames/picma`,
    the `kdesrc-run` function will either not be able to locate the `prefix.sh`
    in the respective path or it will fail to find that path in `kde/usr/bin/...`
    
    This commit extends the approach of arguments expansion `$@`.
    * `${1##*/}` will remove any optional prefix directory:
      `playground/utils/basket` will be shortened to `basket`.
    * `${@:2:$#}` will expand the argument list, but the first which is dealt with above
    * `${2:+ }` inserts a space only if there is a second argument,
      otherwise the `"` quoting would always append a literal space to the command,
      e.g. `picma ` instead of `picma`.
    1bf59885