/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/enc2firefox.sh

  • Committer: Gustav Hartvigsson
  • Date: 2024-07-10 20:03:08 UTC
  • Revision ID: git-v1:d55384577b22b2372b807d0db71abc00396b803a
* enc2firefox.sh
  - Simpelfied if-else-statement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
# 2021-01-13:
13
13
#   * Fixed up if statments
14
14
#
 
15
# 2024-07-10
 
16
#  * Simplefied if-else-statement.
 
17
#
15
18
####
16
19
 
17
20
__IN_NAME=""
117
120
}
118
121
 
119
122
__main () {
120
 
  if [[ ! -e "$__IN_NAME" ]]
121
 
  then
 
123
  if [[ ! -e "$__IN_NAME" ]]; then
122
124
    echo "missing input audio. Please provide."
123
125
    exit 1
124
126
  fi
125
127
  
126
 
  if [[ $__OUT_NAME == "" ]]
127
 
  then
 
128
  if [[ $__OUT_NAME == "" ]]; then
128
129
    echo "missing output file name. Please provide."
129
130
    exit 1
130
131
  fi
131
 
  
132
 
  
133
 
  if [[ $__USE_WEBM == true ]]
134
 
  then
135
 
    if [[ $__IN_NAME == $__OUT_NAME.webm ]]
136
 
    then
 
132
 
 
133
  if [[ $__USE_WEBM == true ]]; then
 
134
    if [[ $__IN_NAME == $__OUT_NAME.webm ]]; then
137
135
      echo "Filenames can't be the same."
138
136
      exit
139
137
    fi
140
138
    __enc_webm
141
 
  elif [[ $__USE_FJ == true ]]
142
 
  then
143
 
    if [[ $__IN_NAME == $__OUT_NAME.mp4 ]]
144
 
    then
145
 
      echo "Filenames can't be the same."
146
 
      exit
 
139
  elif [[ $__IN_NAME == $__OUT_NAME.mp4 ]]; then
 
140
    if [[ $__USE_FJ == true ]]; then
 
141
      __enc_fj
 
142
    else
 
143
      __enc_mp4
147
144
    fi
148
 
    __enc_fj
149
145
  else
150
 
    if [[ $__IN_NAME == $__OUT_NAME.mp4 ]]
151
 
    then
152
 
      echo "Filenames can't be the same."
153
 
      exit
154
 
    fi
155
 
    __enc_mp4
 
146
    echo " Input and output files can't be the same."
 
147
    exit
156
148
  fi
157
149
}
158
150