Bug 1420414 - Update of the update.sh vorbis script r?giles
* +x on the script
* add the #!/bin/sh
* check the number of args
* readme has been renamed
* todo.txt no longer exits
MozReview-Commit-ID: 67JIO610CNg
old mode 100644
new mode 100755
--- a/media/libvorbis/update.sh
+++ b/media/libvorbis/update.sh
@@ -1,9 +1,13 @@
-# Usage: /bin/sh update.sh <vorbis_src_directory>
+#!/bin/sh
+if test $# -ne 1; then
+ echo "Usage: /bin/sh update.sh <vorbis_src_directory>"
+ exit 1
+fi
#
# Copies the needed files from a directory containing the original
# libvorbis source that we need for the Mozilla HTML5 media support.
mkdir -p ./lib
mkdir -p ./include/vorbis
cp $1/lib/envelope.h ./lib/envelope.h
cp $1/lib/lpc.h ./lib/lpc.h
cp $1/lib/highlevel.h ./lib/highlevel.h
@@ -39,19 +43,18 @@ cp $1/lib/os.h ./lib/os.h
cp $1/lib/mdct.c ./lib/vorbis_mdct.c
cp $1/lib/codec_internal.h ./lib/codec_internal.h
cp $1/lib/mdct.h ./lib/mdct.h
cp $1/lib/registry.h ./lib/registry.h
cp $1/lib/codebook.c ./lib/vorbis_codebook.c
cp $1/lib/bitrate.c ./lib/vorbis_bitrate.c
cp $1/lib/block.c ./lib/vorbis_block.c
cp $1/include/vorbis/codec.h ./include/vorbis/codec.h
-cp $1/todo.txt ./todo.txt
cp $1/COPYING ./COPYING
-cp $1/README ./README
+cp $1/README.md ./README.md
cp $1/AUTHORS ./AUTHORS
# Encoder support
cp $1/lib/vorbisenc.c ./lib/vorbisenc.c
cp $1/include/vorbis/vorbisenc.h ./include/vorbis/vorbisenc.h
mkdir -p ./lib/modes
cp $1/lib/modes/setup_44.h ./lib/modes/setup_44.h
cp $1/lib/modes/setup_44u.h ./lib/modes/setup_44u.h