Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
489e4329
Commit
489e4329
authored
Jan 06, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move add_changelog_helper to spec module
parent
0b1e1737
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
26 deletions
+28
-26
common
share/eterbuild/functions/common
+0
-26
spec
share/eterbuild/functions/spec
+28
-0
No files found.
share/eterbuild/functions/common
View file @
489e4329
...
...
@@ -160,32 +160,6 @@ check_key()
return
0
}
add_changelog_helper
()
{
# don't work sometime?
# TODO: fix with $@, single arg?
local
DESC SPEC
if
!
tty
-s
&&
[
-z
"
$DESC
"
]
;
then
echo
"skip changelog fixing without tty"
return
1
fi
add_changelog
-e
"
$@
"
R
=
$?
[
-z
"
$EDITOR
"
]
&&
{
echo
"skip changelog editing without EDITOR var"
;
return
1
;
}
# If changelog sucessfully added
if
[
"
$R
"
=
"0"
]
;
then
shift
for
SPEC
in
"
$@
"
;
do
N
=
`
grep
-n
'^%changelog'
$SPEC
|
head
-n
1 |
sed
s!:.
*
!!
g
`
# +1 -- comment with date and packager name
# +2 -- place for edit comments
# +N works for mcedit and vi
${
EDITOR
}
+
$((
$N
+
2
))
$SPEC
done
fi
return
$R
}
make_temp_file
()
{
# Workaround about broken mktemp
...
...
share/eterbuild/functions/spec
View file @
489e4329
...
...
@@ -128,3 +128,31 @@ subst_namever()
s|%name|
$BASENAME
/|g
s|%version|
$VERSION
/|g"
}
add_changelog_helper
()
{
# don't work sometime?
# TODO: fix with $@, single arg?
local
DESC SPEC
if
!
tty
-s
&&
[
-z
"
$DESC
"
]
;
then
echo
"skip changelog fixing without tty"
return
1
fi
add_changelog
-e
"
$@
"
R
=
$?
[
-z
"
$EDITOR
"
]
&&
{
echo
"skip changelog editing without EDITOR var"
;
return
1
;
}
# If changelog sucessfully added
if
[
"
$R
"
=
"0"
]
;
then
shift
for
SPEC
in
"
$@
"
;
do
N
=
`
grep
-n
'^%changelog'
$SPEC
|
head
-n
1 |
sed
s!:.
*
!!
g
`
# +1 -- comment with date and packager name
# +2 -- place for edit comments
# +N works for mcedit and vi
${
EDITOR
}
+
$((
$N
+
2
))
$SPEC
done
fi
return
$R
}
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