Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- set -x
- realpath() { perl -le 'use Cwd; print Cwd::abs_path(@ARGV)' -- "$@"; }
- progdir=$( realpath "${0%/*}" )
- APPLE="https://opensource.apple.com/tarballs"
- OPENSSL="/usr/local/Cellar/openssl/1.0.2l"
- OPENSSH="OpenSSH-209.50.1"
- OPENSSH_PATCH="$progdir/ssh-agent-sierra-patch.txt"
- OPENSSH_PATCH_URL="https://pastebin.com/raw/32f0Mape"
- SECURITY="Security-57740.60.18"
- set -e
- if [ ! -e "$OPENSSH" ]; then
- [ -e "$OPENSSH.tar.gz" ] || curl -LO $APPLE/OpenSSH/$OPENSSH.tar.gz
- tar zxf "$OPENSSH.tar.gz"
- fi
- [ -e "$OPENSSL" ] || brew install openssl
- CFLAGS="$CFLAGS -I$OPENSSL/include"
- LDFLAGS="-L$OPENSSL/lib"
- if [ ! -e "$SECURITY" ]; then
- [ -e "$SECURITY.tar.gz" ] || curl -LO $APPLE/Security/$SECURITY.tar.gz
- tar zxf "$SECURITY.tar.gz"
- fi
- CFLAGS="$CFLAGS -I$progdir/$SECURITY/header_symlinks"
- [ -e "$OPENSSH_PATCH" ] || curl -L "$OPENSSH_PATCH_URL" -o "$OPENSSH_PATCH"
- cd "$OPENSSH/openssh"
- patch -N < "$OPENSSH_PATCH"
- export CFLAGS LDFLAGS
- ./configure --with-pam --with-audit=bsm
- make
- echo SUCCESS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement