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
7fa93782
Commit
7fa93782
authored
Nov 18, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmpub: rewrite check for target default, use BUILDFARMDIR from Korinf
parent
0cd50823
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
rpmpub
bin/rpmpub
+20
-8
No files found.
bin/rpmpub
View file @
7fa93782
...
@@ -11,6 +11,12 @@
...
@@ -11,6 +11,12 @@
load_mod spec rpm etersoft
load_mod spec rpm etersoft
# fast load Korinf config for BUILDFARMDIR
test
-f
/etc/eterbuild/korinf
&&
.
/etc/eterbuild/korinf
test
-f
$KORINFETC
/korinf
&&
.
$KORINFETC
/korinf
test
-f
~/.config/korinf
&&
.
~/.config/korinf
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echog
"rpmpub - Etersoft specific script for publish gear repo to target ftp dir as src.rpm"
echog
"rpmpub - Etersoft specific script for publish gear repo to target ftp dir as src.rpm"
echog
"Usage: rpmpub [-f] [-r PROJECTVERSION ] [SPEC] [TARGETDIR]"
echog
"Usage: rpmpub [-f] [-r PROJECTVERSION ] [SPEC] [TARGETDIR]"
...
@@ -57,20 +63,26 @@ if [ ! -r "$SPECNAME" ] ; then
...
@@ -57,20 +63,26 @@ if [ ! -r "$SPECNAME" ] ; then
fi
fi
#Example: ETERDESTSRPM=/var/ftp/pub/Etersoft/CIFS@Etersoft/$VERSION/sources
#Example: ETERDESTSRPM=/var/ftp/pub/Etersoft/CIFS@Etersoft/$VERSION/sources
[
-n
"
$ETERDESTSRPM
"
]
||
ETERDESTSRPM
=
"
$1
"
# config value by default
ETERDESTSRPM
=
$BUILDFARMDIR
# try override from value from spec
tfs
=
$(
get_etersoft_srpm_path
$SPECNAME
"
$ALPHA
"
)
if
[
-n
"
$tfs
"
]
;
then
ETERDESTSRPM
=
"
$tfs
"
fi
# [ -n "$ETERDESTSRPM" ] || fatal "Can't detect target dir from spec (Url in Source: field). Run rpmpub with TARGETDIR param"
# override with command arg
[
-n
"
$1
"
]
&&
ETERDESTSRPM
=
"
$1
"
# add sources if not yet
# add sources if not yet
if
[
-n
"
$ETERDESTSRPM
"
]
&&
!
rhas
"
$ETERDESTSRPM
"
"/sources"
;
then
if
[
-n
"
$ETERDESTSRPM
"
]
&&
!
rhas
"
$ETERDESTSRPM
"
"/sources"
;
then
ETERDESTSRPM
=
$ETERDESTSRPM
/sources
ETERDESTSRPM
=
$ETERDESTSRPM
/sources
fi
fi
if
[
-z
"
$ETERDESTSRPM
"
]
;
then
[
-d
"
$ETERDESTSRPM
"
]
||
fatal
"You need run with exists dir to publish src.rpm project (I have checked
$ETERDESTSRPM
, it does not exist)"
ETERDESTSRPM
=
$(
get_etersoft_srpm_path
$SPECNAME
"
$ALPHA
"
)
echo
"Prepare src.rpm to
$ETERDESTSRPM
"
[
-n
"
$ETERDESTSRPM
"
]
||
fatal
"Can't detect target dir from spec (Url in Source: field). Run rpmpub with TARGETDIR param"
echo
"Prepare src.rpm to
$ETERDESTSRPM
"
else
test
-d
"
$ETERDESTSRPM
"
||
fatal
"You need run with exists dir to publish src.rpm project (I have checked
$ETERDESTSRPM
, it does not exist)"
fi
export
ETERDESTSRPM
export
ETERDESTSRPM
PREVPATH
=
$(
readlink
-m
"
$ETERDESTSRPM
/../../last"
)
PREVPATH
=
$(
readlink
-m
"
$ETERDESTSRPM
/../../last"
)
...
...
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