File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 # of the backend, which inherits CUPS's restricted PATH.
2525 enforcerPc = pkgs . writeShellScript "enforcer-pc" ''
2626 set -euo pipefail
27- (${ pkgs . coreutils } /bin/head -n20; ${ pkgs . coreutils } /bin/tail -n20) < "$1" \
28- | ${ pkgs . gawk } /bin/awk '/^%%Pages: [0-9]+$/ {print $2}'
27+ ${ pkgs . gawk } /bin/awk '/^%%Pages: [0-9]+$/ {print $2; exit}' "$1"
2928 '' ;
3029
3130 # enforcer-size: reads %%DocumentMedia:/%%PageMedia: from PostScript spool file.
3231 enforcerSize = pkgs . writeShellScript "enforcer-size" ''
3332 set -euo pipefail
34- (${ pkgs . coreutils } /bin/head -n20; ${ pkgs . coreutils } /bin/tail -n20) < "$1" \
35- | ${ pkgs . gawk } /bin/awk '
36- /^%%PageMedia:/ {print $2}
37- /^%%DocumentMedia:/ {print $2}
38- ' \
39- | ${ pkgs . coreutils } /bin/head -n1
33+ ${ pkgs . gawk } /bin/awk '
34+ /^%%PageMedia:/ {print $2; exit}
35+ /^%%DocumentMedia:/ {print $2; exit}
36+ ' "$1"
4037 '' ;
4138
4239 # enforcer.py with @enforcer_pc@ and @enforcer_size@ paths substituted
You can’t perform that action at this time.
0 commit comments