~vcs-imports/ubuntu-tweak/trunk

« back to all changes in this revision

Viewing changes to data/scripts/convert-image-to-jpg

  • Committer: tualatrix
  • Date: 2008-12-08 02:55:00 UTC
  • Revision ID: vcs-imports@canonical.com-20081208025500-xmpy956tbr6zc2p4
Remove config.h from autoc, added more scripts and make the ScriptWorker more powerful

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# script by Orlando De Giorgi
 
3
 
 
4
# BMP (o bmp)
 
5
nuovo=$(basename $1 | sed s/".bmp"/".jpg"/)
 
6
if [ "$1" != "$nuovo" ]
 
7
then
 
8
        convert  $1 $nuovo
 
9
        exit;
 
10
fi
 
11
 
 
12
nuovo=$(basename $1 | sed s/".BMP"/".jpg"/)
 
13
if [ "$1" != "$nuovo" ]
 
14
then
 
15
        convert  $1 $nuovo
 
16
        exit;
 
17
fi
 
18
 
 
19
 
 
20
# TIF (o tif)
 
21
nuovo=$(basename $1 | sed s/".tif"/".jpg"/)
 
22
if [ "$1" != "$nuovo" ]
 
23
then
 
24
        convert  $1 $nuovo
 
25
        exit;
 
26
fi
 
27
 
 
28
nuovo=$(basename $1 | sed s/".TIF"/".jpg"/)
 
29
if [ "$1" != "$nuovo" ]
 
30
then
 
31
        convert  $1 $nuovo
 
32
        exit;
 
33
fi
 
34
 
 
35
# PNG (o png)
 
36
nuovo=$(basename $1 | sed s/".PNG"/".jpg"/)
 
37
if [ "$1" != "$nuovo" ]
 
38
then
 
39
        convert  $1 $nuovo
 
40
        exit;
 
41
fi
 
42
 
 
43
nuovo=$(basename $1 | sed s/".png"/".jpg"/)
 
44
if [ "$1" != "$nuovo" ]
 
45
then
 
46
        convert  $1 $nuovo
 
47
        exit;
 
48
fi
 
49
 
 
50
# GIF (o gif)
 
51
nuovo=$(basename $1 | sed s/".GIF"/".jpg"/)
 
52
if [ "$1" != "$nuovo" ]
 
53
then
 
54
        convert  $1 $nuovo
 
55
        exit;
 
56
fi
 
57
 
 
58
nuovo=$(basename $1 | sed s/".gif"/".jpg"/)
 
59
if [ "$1" != "$nuovo" ]
 
60
then
 
61
        convert  $1 $nuovo
 
62
        exit;
 
63
fi
 
64