extracting a .sh file - trap?
First of all let me say I'm running Slackware 10.2. I'm trying to get some drivers for my Dell Photo Printer 720 and I've read it's just a repackaged Lexmark z600 series. Lexmark has some linux drivers for the z600 series but of course they're meant for RedHat systems. I extract the tar.gz and get a file called z600cups-1.0-1.gz.sh which the readme says is extracted by giving the command 'sh z600cups-1.0-1.gz.sh'. However when I run that command, I get
Code:
Verifying archive integrity...OK |
trap is a shell builtin, sometimes used in shell scripts (it's apparently used in this one). You can find documentation about it in the bash manpage. The trap command is used to trap certain signals such that they execute commands or parts of the script rather than their default action, such as stopping or ending the script. Here is an excerpt:
Code:
trap [-lp] [[arg] sigspec ...] EDIT: I just downloaded the driver myself to check the script out. Apparently, it's using trap to execute some cleanup of its temporary files from your /tmp directory. When the program is forcefully closed for any trappable reason, it will quickly erase its temporary files before exiting. |
Installing the Lexmark Z600 drivers on Slackware 10.2 (HOW-TO)
Download and extract the archive from the Lexmark site.
Run (as a NON-root user): Code:
$ bash z600cups-1.0-1.gz.sh -keep Now just cd into the installer directory, convert the z600*-cups.rpm to z600*-cups.tgz with rpm2tgz, and installpkg as root. Then, restart the CUPS scheduler and you're all set: Code:
$ cd installer It'd have been nice if Lexmark had simply included the driver file and instructions rather than a non-functional, distribution-specific GUI install. |
All times are GMT -5. The time now is 04:19 PM. |