buildVLCKit.sh 1.33 KB
Newer Older
1 2 3 4 5 6
#!/bin/sh
# Copyright (C) Pierre d'Herbemont, 2010
# Copyright (C) Felix Paul Kühne, 2012-2016

set -e

7
FORWARDEDOPTIONS=""
8

9 10 11 12
if [ -z "$MAKE_JOBS" ]; then
    CORE_COUNT=`sysctl -n machdep.cpu.core_count`
    let MAKE_JOBS=$CORE_COUNT+1
fi
13 14 15 16

usage()
{
cat << EOF
17 18
This is a LEGACY WRAPPER to retain compatibility
------> UPGRADE YOUR BUILD SYSTEM <------
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
EOF
}

spushd()
{
     pushd "$1" 2>&1> /dev/null
}

spopd()
{
     popd 2>&1> /dev/null
}

info()
{
     local green="\033[1;32m"
     local normal="\033[0m"
     echo "[${green}info${normal}] $1"
}

while getopts "hvwsfbdntlk:" OPTION
do
     case $OPTION in
         h)
             usage
             exit 1
             ;;
         v)
47
             FORWARDEDOPTIONS+=" -v"
48
             ;;
49 50
         d)
             FORWARDEDOPTIONS+=" -d"
51
             ;;
52 53
         w)
             FORWARDEDOPTIONS+=" -w"
54 55
             ;;
         n)
56
             FORWARDEDOPTIONS+=" -n"
57 58
             ;;
         l)
59
             FORWARDEDOPTIONS+=" -l"
60 61
             ;;
         k)
62
             FORWARDEDOPTIONS+=" -k" $OPTARG
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
             ;;
         ?)
             usage
             exit 1
             ;;
     esac
done
shift $(($OPTIND - 1))

out="/dev/null"
if [ "$VERBOSE" = "yes" ]; then
   out="/dev/stdout"
fi

if [ "x$1" != "x" ]; then
    usage
    exit 1
fi

82
./buildMobileVLCKit.sh -x $FORWARDEDOPTIONS
83

84
exit 0