Created
July 24, 2011 17:32
-
-
Save blang/1102856 to your computer and use it in GitHub Desktop.
Quick sourcecode 2 pdf script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Quick source code 2 pdf</h1> | |
Author: Benedikt Lang <git@benediktlang.de> | |
usage: SRC_HOME="/home/ben/jworkspace" enscript2pdf listing.txt output | |
Generates output.pdf from files listed in listing.txt with parent directory /home/ben/jworkspace | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
listing.txt: | |
Project1/src/1.java | |
Project2/src/2.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
OLDPWD=$PWD | |
rm $2.ps | |
cd $SRC_HOME | |
cat $OLDPWD/$1 | xargs enscript -E --output=$OLDPWD/$2.ps | |
ps2pdf $OLDPWD/$2.ps $OLDPWD/$2.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment