fix a SeaMonkey bug where toolbars wouldn't appear correctly in view menu or menubar...
[themes.git] / maketheme
CommitLineData
738054be
RK
1#!/bin/sh
2
3RUN_DIR=$(pwd)
4cd $(dirname "$0")
5SCRIPT_DIR=$(pwd)
6
7if [ -n "$1" ]; then
8 case "$1" in
9 EarlyBlue)
10 THEME_NAME=$1
11 ;;
12 LCARStrek)
13 THEME_NAME=$1
14 ;;
15 *)
16 echo "unknown theme $option"
17 ;;
18 esac
19else
20 echo "You must specify a theme name."
39d844b6 21 exit 1
738054be
RK
22fi
23
24# define variables
25THEME_DIR=$SCRIPT_DIR/$THEME_NAME/
26WORK_DIR=$SCRIPT_DIR/$THEME_NAME.tmp/
27XPI_FILE=$SCRIPT_DIR/$THEME_NAME.xpi
28
dae80f0c 29echo "Ensuring a clean work directory..."
738054be
RK
30if [ -e $WORK_DIR ] ; then
31 rm -rf $WORK_DIR/*
32fi
33mkdir -p $WORK_DIR/chrome
34
dae80f0c 35echo "Copying theme files..."
e5e67702 36cp -a $THEME_DIR/* $WORK_DIR/
738054be
RK
37cd $WORK_DIR
38
dae80f0c 39echo "Removing x-* files not intended for shipping..."
e5e67702 40rm -rf x-*
738054be 41
dae80f0c 42echo "Creating new xpi file..."
738054be
RK
43if [ -e $XPI_FILE ] ; then
44 rm $XPI_FILE
45fi
46zip -rX9Dq $XPI_FILE *
47
dae80f0c 48echo "Cleaning work directory..."
99d068f3 49rm -rf $WORK_DIR