Created
June 8, 2018 15:40
-
-
Save valerio-vaccaro/e719c305ea64bf8fafeae40e1c897bfb to your computer and use it in GitHub Desktop.
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 | |
cd /opt/scigen | |
TITLE=`/usr/games/polygen /root/paper.grm` | |
NUMBER=`od -An -N4 -t u < /dev/urandom` | |
DATE=`date +%Y-%m-%d` | |
FOLDER="/home/user-data/www/default/papers/" | |
FILENAME="_article_" | |
SUFFIX=".ps" | |
SUFFIXPDF=".pdf" | |
FILE=$FOLDER$DATE$FILENAME$NUMBER$SUFFIX | |
FILE="$(echo "${FILE}" | tr -d '[:space:]')" | |
OUT=$FOLDER$DATE$FILENAME$NUMBER$SUFFIXPDF | |
OUT="$(echo "${OUT}" | tr -d '[:space:]')" | |
/opt/scigen/make-latex.pl --title "$TITLE" --file $FILE 2>&1 /dev/null | |
echo $OUT"***"$TITLE | |
cd $FOLDER | |
ps2pdf $FILE | |
#2>&1 /dev/null | |
chmod 0777 *.pdf 2>&1 > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment