aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2018-01-14 23:22:35 -0500
committerAndrew Robbins <contact@andrewrobbins.info>2018-01-14 23:22:35 -0500
commita8e95c3d8b30739ce1d64027c792ef310b4d1b84 (patch)
tree87e8a62bf67a2e2460035d73fdb9b999df25bbbb /libs
parent0452c68d11103e4b7b6cf72ac90d0b50bd81ea19 (diff)
downloadlibrebootfr-a8e95c3d8b30739ce1d64027c792ef310b4d1b84.tar.gz
librebootfr-a8e95c3d8b30739ce1d64027c792ef310b4d1b84.zip
Use project_sources_path() in archive creation
Previously, the function 'project_release_sources_archive_path' assumed that a project's source files would always be located within "$root/$SOURCES" in a directory named after the project. However, this does not account for projects such as bucts whose source files are located in "$root/$PROJECTS/$project/sources". In order to address this, trivial changes were made to leverage project_sources_path() as it returns nearly all the information needed to create the path to the archive file.
Diffstat (limited to 'libs')
-rwxr-xr-xlibs/project31
1 files changed, 4 insertions, 27 deletions
diff --git a/libs/project b/libs/project
index 4c8b2fff..e5162fb5 100755
--- a/libs/project
+++ b/libs/project
@@ -1081,34 +1081,11 @@ project_release_sources_archive_path() {
local project=$1
shift
- local sources_path="$root/$SOURCES/"
- local release_path
- local argument
- local path="$project"
-
- for argument in "" "$@"
- do
- if [[ -n "$argument" ]]
- then
- path="$path-$argument"
- fi
-
- local directory_path="$sources_path/$path"
+ local repository="$project"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ local archive_path="$root/$RELEASE/$SOURCES/$project/${sources_path##*/}.$ARCHIVE"
- if ! directory_filled_check "$directory_path"
- then
- continue
- fi
-
- release_path=$path
- done
-
- if [[ -n "$release_path" ]]
- then
- local archive_path="$root/$RELEASE/$SOURCES/$project/$release_path.$ARCHIVE"
-
- printf '%s\n' "$archive_path"
- fi
+ printf '%s\n' "$archive_path"
}
project_release_sources_archive_create() {