Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stu.comp.nus.edu.sg as host #25

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions socprint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

set -euf
export LC_ALL=C
host='sunfire.comp.nus.edu.sg'
host='stu.comp.nus.edu.sg'
default_script='/usr/local/bin/socprint.sh'

usage() {
Expand All @@ -50,7 +50,7 @@ QUICKSTART
Alternatively, use the hosted version at https://socprint.xyz

DESCRIPTION
This script requires a POSIX™-compliant sh, a sunfire account, and connection to
This script requires a POSIX™-compliant sh, a NUS SoC account, and connection to
SoC wifi.

Besides the above, this script has zero-dependencies, is portable, and handles text/byte streams. This makes printing
Expand All @@ -64,7 +64,7 @@ COMMANDS (shortname|longname)

OPTIONS
<username>
Sunfire username, without the @sunfire.comp.nus.edu.sg part.
NUS SoC account username.

<printqueue>
Printer + suffix. See PRINTQUEUES for commonly-used printers.
Expand All @@ -75,7 +75,7 @@ OPTIONS

-i, --identity-file <filepath>
(optional) Additional identity file to use with ssh. Skip if you already set
up sunfire identity files for ssh.
up identity files for ssh.

-2
(optional) Prints every two logical pages onto one physical page.
Expand Down Expand Up @@ -115,10 +115,10 @@ PRINTQUEUES

IMPLEMENTATION
Roughly speaking, the print command will:
1. Login to sunfire using ssh.
1. Login to stu.comp.nus.edu.sg using ssh.
You will be prompted for your password, unless your identity files are set up.
This script *does not* save/record your password.
2. Copy the file into your home directory in sunfire, to a temporary file.
2. Copy the file into your home directory in stu, to a temporary file.
3. Submit your job to the printqueue.
4. List the printqueue. You job *should* appear. If not, something has gone wrong.
5. Remove the temporary file.
Expand All @@ -137,7 +137,7 @@ CONTRIBUTORS

KEYWORDS
how to print NUS SoC National University of Singapore School of Computing
printers shell command line basement sunfire mac windows linux bsd ben
printers shell command line basement mac windows linux bsd ben

LICENSE
This project is licensed under terms of the MIT License. Full text in source code.
Expand Down
Loading