Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
kdesrc-build
kdesrc-build
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SDK
  • kdesrc-buildkdesrc-build
  • Merge Requests
  • !75

Merged
Opened Jan 05, 2021 by Sebastian Engel@blu-baseDeveloper

Update FirstRun.pm to let `kdesrc-run` call executables in subdirectories.

  • Overview 2
  • Commits 2
  • Pipelines 4
  • Changes 1

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/picmi,
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. It's consumed 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. picmi instead of picmi.

    Edit: Separating the quoted command from the optional arguments does the same, but simpler.

This MR will allow to call a project from it's respective subdirectory, such as:
kdescr-run playground/utils/basket
but it will maintain its functionality if the project is conventionally located in kde/src/

Edited Jan 14, 2021 by Sebastian Engel
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: sdk/kdesrc-build!75
Source branch: kdesrc-run-generalization