@ -7,13 +7,14 @@
set -e
set -e
have_version = 0
have_version = 0
have_image = 0
have_image = 0
have_image_2 = 0
usage( )
usage( )
{
{
echo " Usage: $0 -v version -i release_image "
echo " Usage: $0 -v version -i release_image -f second_release_image "
}
}
args = $( getopt -o v:i: -- " $@ " )
args = $( getopt -o v:i:f: -- " $@ " )
if [ $? -ne 0 ] ; then
if [ $? -ne 0 ] ; then
usage
usage
exit 1
exit 1
@ -27,6 +28,11 @@ do
have_image = 1
have_image = 1
shift
shift
; ;
; ;
-f)
RELEASE_IMAGE_2 = $2
have_image_2 = 1
shift
; ;
-v)
-v)
version = $2
version = $2
have_version = 1
have_version = 1
@ -46,7 +52,12 @@ do
done
done
if [ ! " $have_image " -gt 0 ] ; then
if [ ! " $have_image " -gt 0 ] ; then
echo "please provide a release image"
echo "we currently need 2 release images"
usage
exit 1
fi
if [ ! " $have_image_2 " -gt 0 ] ; then
echo "we currently need 2 release images"
usage
usage
exit 1
exit 1
fi
fi
@ -97,16 +108,25 @@ if [ ! "$filesize" -eq "$reference_filesize" ] ; then
echo "filesize of release image is wrong"
echo "filesize of release image is wrong"
exit 1
exit 1
fi
fi
filesize = $( wc -c <" ${ RELEASE_IMAGE_2 } " )
reference_filesize = 4194304
if [ ! " $filesize " -eq " $reference_filesize " ] ; then
echo "filesize of release image is wrong"
exit 1
fi
RELEASE_DIR = " skulls-x230- ${ version } "
RELEASE_DIR = " skulls-x230- ${ version } "
rm -rf " $RELEASE_DIR "
rm -rf " $RELEASE_DIR "
mkdir -p " $RELEASE_DIR "
mkdir -p " $RELEASE_DIR "
# copy-in the ROM
# copy-in the ROMs
cp " ${ RELEASE_IMAGE } " " $RELEASE_DIR "
cp " ${ RELEASE_IMAGE } " " $RELEASE_DIR "
cp " ${ RELEASE_IMAGE_2 } " " $RELEASE_DIR "
RELEASE_IMAGE_FILE = $( basename " ${ RELEASE_IMAGE } " )
RELEASE_IMAGE_FILE = $( basename " ${ RELEASE_IMAGE } " )
sha256sum ${ RELEASE_DIR } /${ RELEASE_IMAGE_FILE } > " ${ RELEASE_DIR } / ${ RELEASE_IMAGE_FILE } .sha256 "
sha256sum ${ RELEASE_DIR } /${ RELEASE_IMAGE_FILE } > " ${ RELEASE_DIR } / ${ RELEASE_IMAGE_FILE } .sha256 "
RELEASE_IMAGE_FILE_2 = $( basename " ${ RELEASE_IMAGE_2 } " )
sha256sum ${ RELEASE_DIR } /${ RELEASE_IMAGE_FILE_2 } > " ${ RELEASE_DIR } / ${ RELEASE_IMAGE_FILE_2 } .sha256 "
# copy in device independent stuff
# copy in device independent stuff
cp ../SOURCE.md " $RELEASE_DIR "
cp ../SOURCE.md " $RELEASE_DIR "