Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.package
Commits
081d22dc
Commit
081d22dc
authored
Sep 19, 2022
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support any kind of _generic files
parent
6e9230cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
obs/_generic/build-scripts/00env.sh
obs/_generic/build-scripts/00env.sh
+11
-1
obs/_generic/build-scripts/20obs.sh
obs/_generic/build-scripts/20obs.sh
+0
-1
No files found.
obs/_generic/build-scripts/00env.sh
View file @
081d22dc
...
...
@@ -84,9 +84,19 @@ copy_and_solve_templates () {
for
descriptor
in
"
$1
"
/
*
;
do
cp
-r
"
$descriptor
"
"
$2
"
for
template_path
in
$(
find
"
$2
/
${
descriptor
##
$1
/
}
"
-name
*
.in
-type
f
)
;
do
item
=
${
descriptor
##
$1
/
}
for
template_path
in
$(
find
"
$2
/
$item
"
-name
*
.in
-type
f
)
;
do
sed
"
$ALL_REGEX
"
"
$template_path
"
>
"
${
template_path
%.in
}
"
rm
"
$template_path
"
done
[
-f
"
$2
/
$(
basename
$item
.in
)
"
]
&&
item
=
$(
basename
$item
.in
)
# if something is called _generic.XXX replace with $SOFTWARE_NAME.XXX
for
gen
in
$(
find
"
$2
/
$item
"
-name
_generic.
*
-type
f
)
;
do
filename
=
$(
basename
--
"
$gen
"
)
extension
=
"
${
filename
##*.
}
"
if
[
"
$filename
"
=
_generic.
"
$extension
"
]
;
then
mv
$gen
$(
dirname
--
"
$gen
"
)
/
"
$SOFTWARE_NAME
"
.
"
$extension
"
fi
done
done
}
obs/_generic/build-scripts/20obs.sh
View file @
081d22dc
...
...
@@ -15,7 +15,6 @@ cd "$INITIAL_DIR"
# copy compilation files and override the files from _generic
# with the one from <software_name>
copy_and_solve_templates
"
$DISTRIB_FILES_GENERIC_DIR
"
"
$OBS_DIR
"
mv
"
$OBS_DIR
"
/_generic.dsc
"
$OBS_DIR
/
$SOFTWARE_AND_VERSION
.dsc"
copy_and_solve_templates
"
$DISTRIB_FILES_SOFTWARE_DIR
"
"
$OBS_DIR
"
# ARCHIVES FILES
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment