~vincentxavier/isocustomization/iso-localization

« back to all changes in this revision

Viewing changes to script_francisation.sh

  • Committer: Vincent-Xavier JUMEL
  • Date: 2010-08-30 14:03:45 UTC
  • Revision ID: endymion+ubuntu@thetys-retz.net-20100830140345-z3pmlt1m8642shoe
Added an option to give an url

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
Localize the CD
28
28
 
29
29
  -d, --directory=WD      working directory (default to /home/virtual/ubuntu/translation)
30
 
  -a, --arch=ARCH         Architecture (default to x86)
 
30
  -a, --arch=ARCH         Architecture (default to i386)
31
31
  -r, --release           Ubuntu release number and name (mandatory)
32
32
  -D, --debug             Turn on debuging, by not purging file
 
33
  -u, --url               Change url (if omissed, the script will try to do some auto-detection)
33
34
  -h, --help              print this message and exit
34
35
  -v, --version           print the version information and exit
35
36
 
45
46
# Note that we use `"$@"' to let each command-line parameter expand to a 
46
47
# separate word. The quotes around `$@' are essential!
47
48
# We need TEMP as the `eval set --' would nuke the return value of getopt.
48
 
TEMP=`getopt -o d:a:r:hD --long directory:,arch:,release:,help,debug -n 'script_francistation.sh' -- "$@"`
 
49
TEMP=`getopt -o d:a:r:u:hD --long directory:,arch:,release:,help,debug,url: -n 'script_francistation.sh' -- "$@"`
49
50
 
50
51
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
51
52
 
58
59
                -a|--arch) ARCH=$2 ; shift 2 ;;
59
60
                -r|--release) V_NUM=$2 ; shift 2 ;; 
60
61
                -D|--debug) debug="1" ; shift 1 ;;
 
62
                -u|--url) DL_URL=$2; shift 2 ;;
61
63
                --) shift ; break ;;
62
64
                *) usage ; exit 0 ;;
63
65
        esac
103
105
 
104
106
VERSION=$V_NAME
105
107
 
106
 
[[ ! -z "$1" ]] && FLAVOR=$1
 
108
ISOPATH=$(echo $DL_URL | sed s,http://,,)
107
109
 
108
110
if [[ -z "$ISOPATH" ]]; then
109
111
    if [[ "$FLAVOR" = "desktop" ]]; then