diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-03-21 14:51:58 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-03-21 14:51:58 -0300 |
commit | 2b53c03c9acf42b240a57901ae1e6d4046f52fb2 (patch) | |
tree | 46d8f0e4e4665835f319103149fb7e419162fae5 /pkg/osx/build_tuntaposx | |
parent | 344abd42c6b480a783ee05b6e92532a1113a86d2 (diff) | |
parent | 9dace17a4b162c3fbef9909b6f8226903b0ad445 (diff) |
Merge remote-tracking branch 'kali/feature/osx-eip-rewrite' into develop
Diffstat (limited to 'pkg/osx/build_tuntaposx')
-rwxr-xr-x | pkg/osx/build_tuntaposx | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkg/osx/build_tuntaposx b/pkg/osx/build_tuntaposx new file mode 100755 index 00000000..10bb7c9c --- /dev/null +++ b/pkg/osx/build_tuntaposx @@ -0,0 +1,45 @@ +#!/bin/zsh +# +# Copyright (C) 2012 ... +# + +REPO="https://github.com/bbits/tuntaposx.git" + +autoload colors; colors +# standard output message routines +# it's always useful to wrap them, in case we change behaviour later +notice() { if [[ $QUIET == 0 ]]; then print "$fg_bold[green][*]$fg_no_bold[default] $1" >&2; fi } +error() { if [[ $QUIET == 0 ]]; then print "$fg[red][!]$fg[default] $1" >&2; fi } +func() { if [[ $DEBUG == 1 ]]; then print "$fg[blue][D]$fg[default] $1" >&2; fi } +act() { + if [[ $QUIET == 0 ]]; then + if [ "$1" = "-n" ]; then + print -n "$fg_bold[white] . $fg_no_bold[default] $2" >&2; + else + print "$fg_bold[white] . $fg_no_bold[default] $1" >&2; + fi + fi +} + +{ test "$1" = "clean" } && { + notice "Cleaning up all tuntaposx build" + rm -rf tuntaposx + act "Done." + return 0 +} + +build_tuntap() { + test -d tuntaposx || git clone $REPO + notice "Cloning tuntaposx sources" + cd tuntaposx/tuntap + notice "Building tuntaposx" + make + mkdir -p ../../dist/tun.kext + cp -r tun.kext/* ../../dist/tun.kext + mkdir -p ../../dist/tuntaposx/StartupItems + cp -r startup_item/tun ../../dist/tuntaposx/StartupItems + cd ../.. +} + +act "Building tuntap" +build_tuntap |