Remove unnecessary copying of PCRE library files - the package template picks them...
[OSXPackageBuilder.git] / privoxy-create.sh
1 #!/bin/sh
2
3 # File        :  privoxy-create.sh
4 #
5 # Purpose     :  Identify the OS X version and call the appropriate
6 #                script to generate the privoxy group and user
7 #
8 # Copyright   :  Written by and Copyright (C) 2001-2012 the
9 #                Privoxy team. http://www.privoxy.org/
10 #
11 #                This program is free software; you can redistribute it
12 #                and/or modify it under the terms of the GNU General
13 #                Public License as published by the Free Software
14 #                Foundation; either version 2 of the License, or (at
15 #                your option) any later version.
16 #
17 #                This program is distributed in the hope that it will
18 #                be useful, but WITHOUT ANY WARRANTY; without even the
19 #                implied warranty of MERCHANTABILITY or FITNESS FOR A
20 #                PARTICULAR PURPOSE.  See the GNU General Public
21 #                License for more details.
22 #
23 #                The GNU General Public License should be included with
24 #                this file.  If not, you can view it at
25 #                http://www.gnu.org/copyleft/gpl.html
26 #                or write to the Free Software Foundation, Inc.,
27 #                51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
28 #                USA
29 #
30 # Modification : If you modify this file please consider whether your 
31 #                changes ought to be passed back to the OSXPackageBuilder
32 #                module.
33 #
34
35 #
36 # 'sudo' check
37 #
38 uid="`/usr/bin/id -u`"
39 if [ ${uid} -ne 0 ]; then
40   echo "Error: insufficient privileges."
41   echo "This script must be executed with the 'sudo' command."
42   echo "Review the README file for instructions on creating a privoxy group and user."
43   exit 1
44 fi
45
46 #
47 # load common settings
48 #
49 . ./common.sh
50
51 #
52 # create a privoxy group and user
53 #
54 if [ ! -z ${SCRIPT} ]; then
55   /bin/sh ./${SCRIPT}
56 else
57   echo "Error: a privoxy group and user cannot be created."
58   echo "This release of Mac OS X is not supported."
59 fi
60