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
83373db0
Commit
83373db0
authored
Apr 20, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loginhsh: add -d, -q -r params
parent
58544cb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
13 deletions
+31
-13
loginhsh
bin/loginhsh
+30
-13
hasher
share/eterbuild/functions/hasher
+1
-0
No files found.
bin/loginhsh
View file @
83373db0
#!/bin/sh
# 2005-2006 (c) Etersoft www.etersoft.ru
# 2005-2006
, 2012
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -7,8 +7,6 @@
# -t - use test hasher
# -i - initialize hasher
# -M? - set target distro
# Public domain
# TODO: -r
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
...
...
@@ -18,7 +16,7 @@ SAVEOPT=$@
#############################
Usage
=
"Usage:
$name
[-t -i -h -r -c
] [-
$CURRENTBRANCHNAME
] bin.rpm
..."
Usage
=
"Usage:
$name
[-t -i -h -r -c
-b -i] [package name] [package file bin.rpm]
..."
function
mygetopts
()
{
name
=
${
0
##*/
}
...
...
@@ -33,26 +31,30 @@ phelp()
echog
" -i initialize hasher"
echog
" -b REPONAME binary repository name (4.1, p5, t6 and so on)"
echog
" -c cleanup hasher"
echog
" -q quiet mode (don't run anything)"
echog
" -r run command"
echog
" -o log in as root user"
echog
" -v verbose"
echog
" -x allow run X program (set DISPLAY and use xauth)"
echog
" -t use test hasher dir (different to build hasher)"
echog
" -M?? branch name"
echo
echog
"Extra options:"
echog
" -a auto test mode for post myhsh build checking"
echog
" -r remote login to hasher"
echog
" -d print hasher dir"
echog
" -M?? branch name"
}
while
getopts
:chitoa
v
b:x opt
;
do
while
getopts
:chitoa
dvqr:
b:x opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
t
)
TESTMODE
=
1
;;
i
)
INITIALIZE
=
1
;;
c
)
CLEANUP
=
1
;;
a
)
AUTOMODE
=
1
;;
d
)
PRINTHASHERDIR
=
1
;;
q
)
QUIETMODE
=
1
;;
b
)
BINARYREPONAME
=
$OPTARG
;;
r
)
R
EMOTE
=
1
;;
r
)
R
UNCOMMAND
=
$OPTARG
;;
x
)
ALLOWX
=
1
;;
v
)
VERBOSE
=
"-v"
;;
o
)
ROOTER
=
"--rooter"
;;
...
...
@@ -87,14 +89,12 @@ if [ -n "$TESTMODE" ] || [ -n "$AUTOMODE" ] ; then
HASHERDIR
=
$HASHERDIR
-test
fi
if
[
-n
"
$REMOTE
"
]
;
then
check_ssh_key
test
-n
"
$BUILDSERVER
"
||
fatal
"Please set BUILDSERVER in config file"
ssh
-t
$BUILDSERVER
loginhsh
${
SAVEOPT
/-r/
}
if
[
"
$PRINTHASHERDIR
"
=
"1"
]
;
then
echo
$HASHERDIR
exit
fi
if
[
"
$CLEANUP
"
=
"1"
]
;
then
echog
"Cleanup hasher in
$HASHERDIR
..."
docmd
$HSH
--cleanup-only
$HASHERDIR
$HASHERARG
||
fatal
"cleanup"
...
...
@@ -111,6 +111,23 @@ SHELLHASHERARG="--mountpoints=/proc"
check_locking
UTILPKG
=
if
[
-n
"
$ALLOWX
"
]
;
then
UTILPKG
=
"
$UTILPKG
xauth fonts-ttf-liberation"
fi
if
[
-n
"
$RUNCOMMAND
"
]
;
then
docmd
$HSH
-install
$HASHERDIR
--wait-lock
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
docmd
$HSH
-run
$ROOTER
$HASHERDIR
--
$RUNCOMMAND
exit
fi
if
[
-n
"
$QUIETMODE
"
]
;
then
docmd
$HSH
-install
$HASHERDIR
--wait-lock
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
echog
"Exiting (quiet mode)..."
exit
fi
echog
"Prepare hasher in
$HASHERDIR
..."
# there is package names in LISTRPMARGS
UTILPKG
=
"mc"
...
...
share/eterbuild/functions/hasher
View file @
83373db0
...
...
@@ -90,6 +90,7 @@ prepare_aptconfig()
$ETERBUILD_APTREPO
EOF
fi
[
-n
"
$QUIETMODE
"
]
||
return
echo
echog
"Apt sources from
$OURSOURCES
:"
cat
$OURSOURCES
|
grep
-v
"^#"
|
grep
-v
"^
\$
"
|
grep
rpm
...
...
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