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
e59c0afc
Commit
e59c0afc
authored
Feb 20, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loginhsh: support -X -Y args, and -p option for override hasher dir name postfix
parent
0b4105c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
loginhsh
bin/loginhsh
+21
-13
No files found.
bin/loginhsh
View file @
e59c0afc
#!/bin/sh
# 2005-2006, 2012 (c) Etersoft www.etersoft.ru
# 2005-2006, 2012
, 2016
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -35,16 +35,18 @@ phelp()
echog
" -r run command"
echog
" -o log in as root user"
echog
" -v verbose"
echog
" -
x
allow run X program (set DISPLAY and install xauth)"
echog
" -
X|-Y
allow run X program (set DISPLAY and install xauth)"
echog
" -t use test hasher dir (different to usual build dir)"
echog
" -p NAME use hasher dir with NAME postfix"
echo
echog
"Extra options:"
echog
" -a auto test mode for post myhsh build checking"
echog
" -d print hasher dir"
echog
" -d print hasher dir
only
"
echog
" -M?? binary repository name (obsoleted)"
echog
" -x allow run X program (obsoleted)"
}
while
getopts
:chitoadvqr:b:
x
opt
;
do
while
getopts
:chitoadvqr:b:
p:xXY
opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
t
)
TESTMODE
=
1
;;
...
...
@@ -55,7 +57,10 @@ while getopts :chitoadvqr:b:x opt; do
q
)
QUIETMODE
=
1
;;
b
)
BINARYREPONAME
=
$OPTARG
;;
r
)
RUNCOMMAND
=
$OPTARG
;;
x
)
ALLOWX
=
1
;;
p
)
HASHERPOSTFIX
=
$OPTARG
;;
X
)
ALLOWX
=
-X
;;
Y
)
ALLOWX
=
-Y
;;
x
)
ALLOWX
=
-Y
;;
v
)
VERBOSE
=
"-v"
;;
o
)
ROOTER
=
"--rooter"
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
...
...
@@ -86,7 +91,9 @@ prepare_aptconfig
HASHERARG
=
"
$HASHERARG
--apt-config=
$OURAPTCONF
--target
$BUILDARCH
--with-stuff"
set_hasherdir
if
[
-n
"
$TESTMODE
"
]
||
[
-n
"
$AUTOMODE
"
]
;
then
if
[
-n
"
$HASHERPOSTFIX
"
]
;
then
HASHERDIR
=
$HASHERDIR
-
$HASHERPOSTFIX
elif
[
-n
"
$TESTMODE
"
]
||
[
-n
"
$AUTOMODE
"
]
;
then
HASHERDIR
=
$HASHERDIR
-test
fi
...
...
@@ -119,12 +126,6 @@ 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)..."
...
...
@@ -143,13 +144,20 @@ fi
if
[
-n
"
$AUTOMODE
"
]
||
[
-n
"
$ALLOWX
"
]
;
then
UTILPKG
=
"
$UTILPKG
xauth fonts-ttf-liberation"
SHELLHASHERARG
=
"
$SHELLHASHERARG
$ALLOWX
"
else
UTILPKG
=
"
$UTILPKG
etersoft-build-utils"
fi
docmd
$HSH
-install
$HASHERDIR
--wait-lock
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
if
[
-n
"
$RUNCOMMAND
"
]
;
then
docmd
$HSH
-run
$HASHERDIR
$SHELLHASHERARG
$ROOTER
--wait-lock
--
$RUNCOMMAND
exit
fi
echog
"You are in hasher shell"
docmd
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
$ROOTER
-
Y
--shell
docmd
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
$ROOTER
-
-wait-lock
--shell
if
[
-n
"
$AUTOMODE
"
]
;
then
# FIXME: do not remove on x86_64
...
...
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