Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
Uniprint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Flueren
Uniprint
Commits
890f3607
Commit
890f3607
authored
5 months ago
by
JonOfUs
Browse files
Options
Downloads
Patches
Plain Diff
Make compatible with buero-pc
parent
dd11f71c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
uniprint
+107
-71
107 additions, 71 deletions
uniprint
with
107 additions
and
71 deletions
uniprint
+
107
−
71
View file @
890f3607
...
...
@@ -59,6 +59,10 @@ if [ -z "$UNIHOST" ]; then
read
-p
"Host: "
UNIHOST
fi
if
[
-z
"
$UNIUSER2
"
]
;
then
UNIUSER2
=
"
$UNIUSER
"
fi
if
[
-z
"
$UNIHOST2
"
]
;
then
UNIHOST2
=
"
$UNIHOST
"
fi
...
...
@@ -72,11 +76,11 @@ if [ -z "$ORIENTATION" ]; then
fi
if
[
-z
"
$DUPLEX
"
]
;
then
DUPLEX
=
simplex
DUPLEX
=
one-sided
fi
if
[
-z
"
$PAGES
"
]
;
then
PAGES
=
0
PAGES
=
1
fi
if
[
-z
"
$RANGE
"
]
;
then
...
...
@@ -107,7 +111,33 @@ case $QUALITY in
;;
esac
ADDITIONALOPTIONS
=
"-#
$COUNT
-K
$DUPLEX
-O
$ORIENTATION
-onumber-up=
$PAGES
-opage-ranges=
$RANGE
-oprint-quality=
$QUALITY
"
case
$ORIENTATION
in
portrait
)
ORIENTATION
=
""
;;
landscape
)
ORIENTATION
=
"-oorientation-requested=4"
;;
*
)
echo
"Unknown orientation
$ORIENTATION
"
exit
1
;;
esac
case
$PAGES
in
0
|
1
)
PAGES
=
""
;;
2
|
4
|
6
|
9
|
16
)
PAGES
=
"-onumber-up=
$PAGES
"
;;
*
)
echo
"Invalid number of pages per output page,
$PAGES
"
exit
1
;;
esac
ADDITIONALOPTIONS
=
"-#
$COUNT
$ORIENTATION
$PAGES
-osides=
$DUPLEX
-opage-ranges=
$RANGE
-oprint-quality=
$QUALITY
"
FILE
=
$@
if
[
-z
"
$FILE
"
]
;
then
...
...
@@ -117,9 +147,15 @@ fi
echo
"Printing
$FILE
on
$UNIPRINTER
as
$UNIUSER
@
$UNIHOST
"
# If the host is localhost, we can print directly
if
[
"
$UNIHOST
"
-eq
"localhost"
]
;
then
if
[
"
$UNIHOST
"
=
"localhost"
]
;
then
lpr
-P
$UNIPRINTER
$UNIOPTIONS
$ADDITIONALOPTIONS
"
$FILE
"
exit
$?
fi
ssh
-J
"
$UNIUSER
@
$UNIHOST
"
$UNIUSER
@
$UNIHOST2
"lpr -P
$UNIPRINTER
$UNIOPTIONS
$ADDITIONALOPTIONS
"
<
"
$FILE
"
if
[
"
$UNIHOST2
"
=
"
$UNIHOST
"
]
;
then
JUMPHOST
=
""
else
JUMPHOST
=
"-J
$UNIUSER
@
$UNIHOST
"
fi
ssh
$JUMPHOST
$UNIUSER2
@
$UNIHOST2
"lpr -P
$UNIPRINTER
$UNIOPTIONS
$ADDITIONALOPTIONS
"
<
"
$FILE
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment