• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2020 the V8 project authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
7
8OS="linux"
9OS_LABEL="Linux"
10SUFFIX=""
11if [[ -n "$1" && $1 == "win" ]]; then
12  OS="win"
13  OS_LABEL="Windows"
14  SUFFIX=".exe"
15elif [[ -n "$1" && $1 == "macos" ]]; then
16  OS="macos"
17  OS_LABEL="MacOS"
18fi
19
20echo "Building and packaging for $OS_LABEL..."
21(set -x; $DIR/node_modules/.bin/pkg -t node10-$OS-x64 $DIR)
22
23rm -rf $DIR/output > /dev/null 2>&1 || true
24rm $DIR/output.zip > /dev/null 2>&1 || true
25
26mkdir $DIR/output
27cd $DIR/output
28ln -s ../db db
29ln -s ../ochang_js_fuzzer$SUFFIX run$SUFFIX
30ln -s ../foozzie_launcher.py foozzie_launcher.py
31echo "Creating $DIR/output.zip"
32(set -x; zip -r $DIR/output.zip * > /dev/null)
33