Project

General

Profile

« Previous | Next » 

Revision 81910556

Added by jahoti almost 2 years ago

  • ID 81910556643b5878b001ed443aebf719d5bf99b9
  • Parent fbf0503f

Add build support for update URLs

The 'url' parameter can now be used to provide an update URL

View differences:

build.sh
18 18
    echo "    -C, chromium:      build for Chromium and derivatives"
19 19
    echo "    -M, mozilla:       build for Firefox and derivatives"
20 20
    echo "options:"
21
    echo "    -b, build=[LOC]:   set file/directory to use for building"
21
    echo "    -b, build=[LOC]:   file/directory to use for building"
22 22
    echo "    -h, help:          print usage information and exit"
23
    echo "    -o, output=[LOC]:  set output file/directory"
24
    echo "    -k, key=[LOC]:     select a key to use in building and"
25
    echo "                       signing a CRX"
23
    echo "    -o, output=[LOC]:  output file/directory"
24
    echo "    -k, key=[LOC]:     the key to use in signing a CRX;"
25
    echo "                       builds a CRX instead of a ZIP"
26 26
    echo "    -s, safe:          don't delete existing directories;"
27 27
    echo "                       throw an error instead"
28
    echo "    -u, url=[URL]:     URL to check for updates"
28 29
    echo "    -z, zip:           pack the extension as a file"
29 30
    echo
30 31
    echo "environment variables (optional)"
31
    echo "    HAKETILO_ZIP: command to use for generating ZIP files"
32
    echo "    HAKETILO_CHROMIUM: command to user to invoke Chromium"
32
    echo "    HAKETILO_ZIP:      command to use for generating ZIP files"
33
    echo "    HAKETILO_CHROMIUM: command to use for invoking Chromium"
33 34
    
34 35
    exit $EXIT_STATUS
35 36
}
......
38 39

  
39 40
BROWSER=''
40 41
BUILDDIR=''
42
KEY=''
43
UPDATE_URL=''
41 44
MAKEZIP=0
42 45
FORCE=1
43 46

  
......
53 56
	-o | --output)            OUTPUT="$2"; shift;;
54 57
	output=*)  OUTPUT="$(echo "$1" | cut -c 8-)";;
55 58
	-s | --safe | safe)                  FORCE=0;;
59
	-u | --url)           UPDATE_URL="$2"; shift;;
60
	url=*) UPDATE_URL="$(echo "$1" | cut -c 5-)";;
56 61
	-z | --zip | zip_ext)              MAKEZIP=1;;
57 62
	*) print_usage 2 Unrecognized option "'$1'.";;
58 63
    esac
......
67 72
    elif [ $MAKEZIP = 0 ]; then
68 73
	print_usage 4 The "'key'" option must be used in conjunction with the "'zip'" option.
69 74
    elif [ ! -e "$KEY" ]; then
70
	print_usage 5 The specified key file "'$KEY'" does not exist.
75
	errcho "The specified key file '$KEY' does not exist."
76
	exit 5
71 77
    fi
78
    
72 79
    KEY="$(realpath "$KEY")"
73 80
fi
74 81

  

Also available in: Unified diff