~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 13:43:26 UTC
  • Revision ID: endymion+ubuntu@thetys-retz.net-20100830134326-lbhdpnwxim8glh0n
Added a debug swith to keep temp file to explore it later, in case something went wrong

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  -d, --directory=WD      working directory (default to /home/virtual/ubuntu/translation)
30
30
  -a, --arch=ARCH         Architecture (default to x86)
31
31
  -r, --release           Ubuntu release number and name (mandatory)
 
32
  -D, --debug             Turn on debuging, by not purging file
32
33
  -h, --help              print this message and exit
33
34
  -v, --version           print the version information and exit
34
35
 
44
45
# Note that we use `"$@"' to let each command-line parameter expand to a 
45
46
# separate word. The quotes around `$@' are essential!
46
47
# We need TEMP as the `eval set --' would nuke the return value of getopt.
47
 
TEMP=`getopt -o d:a:r:h --long directory:,arch:,release:,help -n 'script_francistation.sh' -- "$@"`
 
48
TEMP=`getopt -o d:a:r:hD --long directory:,arch:,release:,help,debug -n 'script_francistation.sh' -- "$@"`
48
49
 
49
50
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
50
51
 
56
57
                -d|--directory) WD=$2 ; shift 2;;
57
58
                -a|--arch) ARCH=$2 ; shift 2 ;;
58
59
                -r|--release) V_NUM=$2 ; shift 2 ;; 
 
60
                -D|--debug) debug="1" ; shift 1 ;;
59
61
                --) shift ; break ;;
60
 
                *) usage ; exit 1 ;;
 
62
                *) usage ; exit 0 ;;
61
63
        esac
62
64
done
63
65
 
230
232
cd ${WD}/extract-cd
231
233
sudo mkisofs -r -V "Ubuntu ${V_NUM} Edition Francophone" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-${V_NUM}-desktop-i386-fr.iso .
232
234
 
233
 
cd ${WD}
234
 
 
235
 
sudo rm -rf ${WD}/mnt ${WD}/extract-cd ${WD}/edit ${WD}/tmp *.img
 
235
if [ $debug -eq "1" ]; then
 
236
        cd ${WD}
 
237
        sudo rm -rf ${WD}/mnt ${WD}/extract-cd ${WD}/edit ${WD}/tmp *.img
 
238
fi