1#!/bin/bash
2#
3# Copyright 2006, Broadcom Corporation
4# All Rights Reserved.                
5#                                     
6# This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;   
7# the contents of this file may not be disclosed to third parties, copied
8# or duplicated in any form, in whole or in part, without the prior      
9# written permission of Broadcom Corporation.                            
10#  
11# Creates an open license tarball
12#
13# $Id: release.sh,v 1.1.1.1 2008/10/15 03:25:52 james26_jang Exp $
14#
15
16FILELIST="gpl-filelist.txt"
17FILELISTTEMP="gpl-filelist-temp.txt"
18
19RELEASE=yes
20
21
22usage ()
23{
24    echo "usage: $0 [open release]"
25    exit 1
26}
27
28[ "${#*}" = "0" ] && usage
29
30echo "cat ${FILELIST} | sed -e 's/[[:space:]]*$//g' > ${FILELISTTEMP}"
31cat ${FILELIST} | sed -e 's/[[:space:]]*$//g' > ${FILELISTTEMP}
32if ! diff ${FILELIST} ${FILELISTTEMP} > /dev/null 2>&1; then
33   echo "WARNING: "
34   echo "WARNING: Fix trailing whitespace in following entries"
35   echo "WARNING: in ${FILELIST} file (ignored)"
36   echo "WARNING: "
37   diff ${FILELIST} ${FILELISTTEMP} | grep "^>"
38fi
39
40# create open license tarball
41echo -e "\ntar czf \"$1\" -T ${FILELISTTEMP} --ignore-failed-read\n"
42tar czf "$1" -T ${FILELISTTEMP} --ignore-failed-read
43rm -f ${FILELISTTEMP}
44
45
46