3868261da5
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@2808 af16638f-c34d-0410-8cfa-b39d5352b314
155 lines
3.5 KiB
Bash
Executable File
155 lines
3.5 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2008-2009 by respective authors (see below). All rights reserved.
|
|
#
|
|
# This file is part of BigBlueButton - http://www.bigbluebutton.org
|
|
#
|
|
# BigBlueButton is free software; you can redistribute it and/or modify it under the
|
|
# terms of the GNU Lesser General Public License as published by the Free Software
|
|
# Foundation; either version 3 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public License along
|
|
# with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# Author(s):
|
|
# Fred Dixon <ffdixon@bigbluebutton.org>
|
|
#
|
|
# Changelog:
|
|
# 2009-09-13 Fixed problem with $CURRENT_USER FFD
|
|
#
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
echo "
|
|
bbb-setupdev: Setup a BigBlueButton Development environment
|
|
|
|
Usage:
|
|
-s : Setup Samba (you'll be asked for your password to run sudo)
|
|
-d : Setup development environment
|
|
"
|
|
fi
|
|
|
|
CURRENT_USER=$(whoami)
|
|
|
|
while getopts "sd" flag
|
|
do
|
|
case "$flag" in
|
|
s) echo "Setting up Samba"
|
|
SAMBA=1
|
|
;;
|
|
|
|
d) echo "Setting up BigBlueButton Devopment for $CURRENT_USER"
|
|
DEV=1
|
|
;;
|
|
|
|
*) break;;
|
|
esac
|
|
done
|
|
|
|
|
|
|
|
#
|
|
# Setup Samba
|
|
#
|
|
|
|
if [ $SAMBA ]; then
|
|
#
|
|
# Instal Samba
|
|
#
|
|
if ! dpkg-query -s samba > /dev/null 2>&1; then
|
|
sudo apt-get install --force-yes samba ant
|
|
fi
|
|
|
|
#
|
|
# Add a share to samba
|
|
#
|
|
if ! grep -q $CURRENT_USER /etc/samba/smb.conf; then
|
|
|
|
echo ";
|
|
; BigBlueButton: Share the development directory
|
|
[$CURRENT_USER]
|
|
comment = BigBlueButton Development share
|
|
path = /home/$CURRENT_USER
|
|
browseable = yes
|
|
read only = no
|
|
create mask = 0755
|
|
directory mask = 0775
|
|
guest ok = yes
|
|
force user = $CURRENT_USER
|
|
" | sudo tee -a /etc/samba/smb.conf > /dev/null 2>&1
|
|
|
|
sudo /etc/init.d/samba restart
|
|
|
|
echo "
|
|
You can now access your development folder through:
|
|
|
|
\\\\$(hostname)\\$CURRENT_USER
|
|
|
|
If you are running a development environment on Windows (such as using Eclipse or FlexBuilder),
|
|
you can map the above path to a drive letter.
|
|
"
|
|
else
|
|
echo "Already detected a definition for $CURRENT_USER in /etc/samba/smb.conf"
|
|
echo "No changes were made to /etc/samba/smb.conf"
|
|
fi
|
|
fi
|
|
#
|
|
# Setup dev
|
|
|
|
if [ $DEV ]; then
|
|
|
|
echo "
|
|
#
|
|
# Checking out BigBlueButton Apps for red5
|
|
#
|
|
"
|
|
cd ~/dev
|
|
if [ ! -d bigbluebutton-apps ]; then
|
|
svn checkout http://bigbluebutton.googlecode.com/svn/trunk/bigbluebutton-apps bigbluebutton-apps
|
|
cd bigbluebutton-apps
|
|
|
|
#./build.sh
|
|
fi
|
|
|
|
echo "
|
|
#
|
|
# Checking out BigBlueButton Web application for tomcat
|
|
#
|
|
"
|
|
cd ~/dev
|
|
if [ ! -d bigbluebutton-web ]; then
|
|
svn checkout http://bigbluebutton.googlecode.com/svn/trunk/bigbluebutton-web bigbluebutton-web
|
|
cd bigbluebutton-web
|
|
grails set-version 0.1
|
|
|
|
#./build.sh
|
|
fi
|
|
|
|
echo "
|
|
#
|
|
# Checking out BigBlueButton Flash client
|
|
#
|
|
"
|
|
cd ~/dev
|
|
if [ ! -d bigbluebutton-client ]; then
|
|
svn checkout http://bigbluebutton.googlecode.com/svn/trunk/bigbluebutton-client bigbluebutton-client
|
|
cd bigbluebutton-client
|
|
|
|
#./build.sh
|
|
fi
|
|
|
|
echo "
|
|
To build any of bigbluebutton-dev, bigbluebutton-client, or bigbluebutton-web, just change to the associated directory
|
|
and issue the command
|
|
|
|
./build.sh
|
|
"
|
|
cd ~/dev
|
|
|
|
fi
|
|
|