improve and correct identity box display, also make it work with current 17.0a1 Night...
[themes.git] / maketheme
... / ...
CommitLineData
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."
21 exit 1
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
29echo "Ensuring a clean work directory..."
30if [ -e $WORK_DIR ] ; then
31 rm -rf $WORK_DIR/*
32fi
33mkdir -p $WORK_DIR/chrome
34
35echo "Copying theme files..."
36cp -a $THEME_DIR/* $WORK_DIR/
37cd $WORK_DIR
38
39echo "Removing x-* files not intended for shipping..."
40rm -rf x-*
41
42echo "Creating new xpi file..."
43if [ -e $XPI_FILE ] ; then
44 rm $XPI_FILE
45fi
46zip -rX9Dq $XPI_FILE *
47
48echo "Cleaning work directory..."
49rm -rf $WORK_DIR