aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-08-17 04:11:25 -0300
committerEuAndreh <eu@euandre.org>2025-08-17 04:11:25 -0300
commitb48033535688db45b4d96b31341c1334a68c0ac6 (patch)
tree64817f9b3b3eec439458201b7012e09da8b95465
parentetc/guix/home.scm: Disable and mark "frama-c" as broken (diff)
downloaddotfiles-b48033535688db45b4d96b31341c1334a68c0ac6.tar.gz
dotfiles-b48033535688db45b4d96b31341c1334a68c0ac6.tar.xz
bin/print: Separate rule for text from other file types
-rwxr-xr-xbin/print5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/print b/bin/print
index 4f41272..accccd3 100755
--- a/bin/print
+++ b/bin/print
@@ -57,8 +57,11 @@ main() {
ps2pdf "$FILE" "$NEWDIR"/in.pdf
elif file -b "$FILE" | grep -q PDF; then
cp "$FILE" "$NEWDIR"/in.pdf
- else
+ elif file -b "$FILE" | grep -q text; then
enscript -o- "$FILE" | ps2pdf - "$NEWDIR"/in.pdf
+ else
+ lp $OPTS "$FILE"
+ return
fi
cd "$NEWDIR"