summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/med-xpi-pack20
-rwxr-xr-xsrc/med-xpi-unpack26
2 files changed, 29 insertions, 17 deletions
diff --git a/src/med-xpi-pack b/src/med-xpi-pack
index 9d3e433..8abfb69 100755
--- a/src/med-xpi-pack
+++ b/src/med-xpi-pack
@@ -27,31 +27,37 @@ INDIR=$1;
XPIFILE=$2;
usage() {
- echo "med-xpi-pack - Script to produce XPI file from input directory.\n";
+ echo "med-xpi-pack - Script to produce XPI file from input directory."
+ echo
echo "The output XPI file is placed in top-level of the input directory.";
echo "To place it somewhere else, provide relative or absolute path to the";
- echo "output XPI file.\n"
+ echo "output XPI file."
+ echo
echo "To run it call:";
- echo "$ med-xpi-pack input_directory output_xpi_file\n";
+ echo "$ med-xpi-pack input_directory output_xpi_file"
+ echo
echo " input_directory - directory with the XPI source tree";
echo " output_xpi_file - name of the produced file";
exit 1;
}
if [ "$1" = "--help" -o "$1" = "-h" ] ; then
- usage;
+ usage
fi;
if [ -z $INDIR ] ; then
- echo "Missing input directory.\n";
+ echo "Missing input directory."
+ echo
usage;
fi;
if [ -z $XPIFILE ] ; then
- echo "Missing XPI name.\n";
+ echo "Missing XPI name."
+ echo
usage;
fi;
if [ ! -d $INDIR ] ; then
- echo "E: Input directory doesn't exist.\n";
+ echo "E: Input directory doesn't exist."
+ echo
usage;
fi;
diff --git a/src/med-xpi-unpack b/src/med-xpi-unpack
index 778e4b5..a487582 100755
--- a/src/med-xpi-unpack
+++ b/src/med-xpi-unpack
@@ -25,9 +25,11 @@ XPIFILE=$1;
OUTDIR=$2;
usage() {
- echo "med-xpi-unpack - Script to unpack XPI file to output directory.\n";
+ echo "med-xpi-unpack - Script to unpack XPI file to output directory."
+ echo
echo "To run it call:";
- echo "$ med-xpi-unpack input_xpi_file output_directory\n";
+ echo "$ med-xpi-unpack input_xpi_file output_directory"
+ echo
echo " input_xpi_file - packed XPI source tree";
echo " output_directory - location where the unpacke XPI file is placed";
exit 1;
@@ -38,21 +40,25 @@ if [ "$1" = "--help" -o "$1" = "-h" ] ; then
fi;
if [ -z $XPIFILE ] ; then
- echo "Missing XPI file.\n";
- usage;
+ echo "Missing XPI file."
+ echo
+ usage
fi;
if [ -z $OUTDIR ] ; then
- echo "Missing output directory.\n";
- usage;
+ echo "Missing output directory."
+ echo
+ usage
fi;
if [ -d $OUTDIR ] ; then
- echo "E: Output directory already exists.\n";
- usage;
+ echo "E: Output directory already exists."
+ echo
+ usage
fi;
if [ ! -f $XPIFILE ] ; then
- echo "E: XPI file doesn't exist.\n";
- usage;
+ echo "E: XPI file doesn't exist."
+ echo
+ usage
fi;
mkdir $OUTDIR;