Explorar el Código

adding some randomness to temporary file

master
Gustavo Neves hace 8 años
padre
commit
c2c4a12e8f
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. +3
    -1
      pdfScale.sh

+ 3
- 1
pdfScale.sh Ver fichero

@@ -85,10 +85,12 @@ main() {
getPageSize getPageSize
vPrintPageSizes ' Source' vPrintPageSizes ' Source'
local finalRet=$EXIT_ERROR local finalRet=$EXIT_ERROR
local tempFile=""
local tempSuffix="$RANDOM""_TEMP_$RANDOM.pdf"


if isMixedMode; then if isMixedMode; then
outputFile="$OUTFILEPDF" # backup outFile name outputFile="$OUTFILEPDF" # backup outFile name
tempFile="${OUTFILEPDF%.pdf}.__TEMP__.pdf" # set a temp file name
tempFile="${OUTFILEPDF%.pdf}.$tempSuffix" # set a temp file name
OUTFILEPDF="$tempFile" # set output to tmp file OUTFILEPDF="$tempFile" # set output to tmp file
pageResize # resize to tmp file pageResize # resize to tmp file
finalRet=$? finalRet=$?


Cargando…
Cancelar
Guardar