#!/bin/sh
#
#       build-jar.sh
#	Run this script to repackage all the separate Swing .jar files 
#	into one jar file and include the BeanInfo classes and Icons. 
#       
#


echo "Creating swingall.jar file in current directory"

# unjar the existing swing.jar,motif.jar, windows.jar beaninfo.jar

if [ ! -f ./swing.jar ]; then
    echo "Can't find swing.jar in current directory"
    exit 1
fi

if [ -d ./com ]; then
    echo "Please run this script from a directory that doesn't already one named \"com\""
    exit 2
fi


jar xf swing.jar
jar xf motif.jar
jar xf windows.jar
jar xf beaninfo.jar


jar cfm swingall.jar manifest com/sun

rm -rf com 
echo "Now you can import swingall.jar into a Builder App"
