Skip to content

Instantly share code, notes, and snippets.

@patrl
Created January 23, 2018 12:57
Show Gist options
  • Save patrl/89860d845c167f2da7e9cf956a080e6b to your computer and use it in GitHub Desktop.
Save patrl/89860d845c167f2da7e9cf956a080e6b to your computer and use it in GitHub Desktop.
Script for mergings pdfs using ghostscript. Fetches dependencies using nix.
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash ghostscript
for ARG in "$@"
do
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf $ARG
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment