root/vidalia/tags/vidalia-0.0.15/pkg/package.sh

Revision 1563, 2.2 kB (checked in by edmanm, 2 years ago)

Set eol-style native on just about everything.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
Line 
1#!/bin/bash
2#
3#  $Id$
4#
5#  Vidalia is distributed under the following license:
6#
7#  Copyright (C) 2006,  Matt Edman, Justin Hipple
8#
9#  This program is free software; you can redistribute it and/or
10#  modify it under the terms of the GNU General Public License
11#  as published by the Free Software Foundation; either version 2
12#  of the License, or (at your option) any later version.
13#
14#  This program is distributed in the hope that it will be useful,
15#  but WITHOUT ANY WARRANTY; without even the implied warranty of
16#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17#  GNU General Public License for more details.
18#
19#  You should have received a copy of the GNU General Public License
20#  along with this program; if not, write to the Free Software
21#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
22#  02110-1301, USA.
23#################################################################
24
25# Builds distribution packages for various platforms.
26
27
28# Check for proper script arguments
29if [ "$#" -eq 0 ]
30then
31  echo "Usage: $0 <tarball|win32|osx|osx-bundle>"
32  exit 1
33fi
34
35
36# Make the distribution depending on what type was requested
37case "$1" in
38#
39# Source tarball (.tar.gz)
40#
41"tarball")
42  # Put the tarball in the current directory
43  destdir=`pwd`
44  srcdir=`dirname $(pwd) | sed -e "s/.*\///"`
45  tarball="$destdir/$srcdir.tar.gz"
46 
47  echo "Creating source tarball: $tarball" 
48  pushd "../.." 1>/dev/null
49  filelist=`svn ls -R $srcdir/ |
50              sed -e "s/^/$srcdir\/&/" |
51              sed -e "/\/$/d" |
52              sed -e "s/\n/ /"`
53  filelist="$srcdir/configure $filelist"
54  tar -czf "$tarball" $filelist
55  popd -1 1>/dev/null
56  ;;
57 
58#
59# OS X .dmg
60#
61"osx")
62  srcdir="../"
63  srcfiles="Vidalia.app README AUTHORS LICENSE COPYING CHANGELOG"
64  osx/builddmg.sh "$srcdir" "$srcfiles"
65  ;;
66
67#
68# OS X .mpkg (Bundle)
69#
70"osx-bundle")
71  if [ $# -ne 3 ]
72  then
73    echo "Usage: $0 osx-bundle <path-to-tor> <privoxy-pkg.zip>"
74    exit 1
75  fi
76  torpath="$2"
77  privoxy="$3"
78 
79  pushd "osx"
80  ./buildmpkg.sh "$torpath" "$privoxy"
81  popd
82  ;;
83 
84#
85#  Windows .exe installer
86#
87"win32")
88  echo "Unimplemented"
89  ;;
90
91#
92# Invalid
93#
94*)
95  echo "Unrecognized distribution type."
96  ;;
97esac
98
99exit $?
Note: See TracBrowser for help on using the browser.