/useful/trunk-1

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/useful/trunk-1

« back to all changes in this revision

Viewing changes to scripts/process_text_to_image.sh

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-13 20:29:17 UTC
  • Revision ID: git-v1:4502736d0e4c4af9a28416c4b04bf9725893c5a0
Fixed up the rest of the if statments.

  I have no idea how it even worked before.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
  echo "DPI: $DPI"
101
101
  #echo "ESCAPED_CWD\: $ESCAPED_CWD"
102
102
  
103
 
  if [ ! -e "$CWD/$IN_FILE" ]
 
103
  if [[ ! -e "$CWD/$IN_FILE" ]]
104
104
  then
105
105
    echo "!!!in file does not exist!!!"
106
106
    echo ""
116
116
  cd "$CWD/tmp"
117
117
  
118
118
  # Now we can start the work for this.
119
 
  if [ $_NO_PANDOC_HEADER = false ]
 
119
  if [[ $_NO_PANDOC_HEADER == false ]]
120
120
  then
121
121
    # We add a special header to the file to make it pandoc know what to do.
122
122
    
145
145
  FINAL_IMAGE=""
146
146
  
147
147
  # If we invert the final image this is where we do it.
148
 
  if [ $INVERT_COLOURS = true ]
 
148
  if [[ $INVERT_COLOURS == true ]]
149
149
  then
150
150
    convert "$CWD/tmp/big-page.png" -channel RGB -negate "$CWD/tmp/big-page-inverted.png"
151
151
    FINAL_IMAGE="$CWD/tmp/big-page-inverted.png"
158
158
 
159
159
 
160
160
parse_args() {
161
 
  if [ -z "$1" ]
 
161
  if [[ -z "$1" ]]
162
162
  then
163
163
    echo "Try --help or -h."
164
164
    exit 1
223
223
parse_args "${@}"
224
224
main
225
225
 
226
 
if [ $PERSERVE_TMP = true ]
 
226
if [[ $PERSERVE_TMP = true ]]
227
227
then
228
228
  echo "Not cleaning up!"
229
229
else