File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- SHOULD_OPEN_XCODE= $1
3+ SCRIPT_DIRECTORY= $( dirname $0 )
44
5- export MACOSX_DEPLOYMENT_TARGET=10.10 # Must match GitUp
5+ rm -rf " $SCRIPT_DIRECTORY /xcode"
6+ mkdir " $SCRIPT_DIRECTORY /xcode"
67
7- rm -rf " xcode"
8- mkdir " xcode"
9- cd " xcode"
10- cmake -G " Xcode" ..
8+ MACOSX_DEPLOYMENT_TARGET=10.10 cmake -S " $SCRIPT_DIRECTORY " -B " $SCRIPT_DIRECTORY /xcode" -G " Xcode"
119
12- # We should copy a features.h file
10+ # We should copy a features.h file
1311# from ./xcode/src/git2/sys/features.h
1412# to ./git2/sys/features.h
1513
16- cd ../
17- mv " ./xcode/src/git2/sys/features.h" " ./include/git2/sys/features.h"
14+ mv " $SCRIPT_DIRECTORY /xcode/src/git2/sys/features.h" " $SCRIPT_DIRECTORY /include/git2/sys/features.h"
1815
19- # And open Xcode if needed.
20- if [ -z " $SHOULD_OPEN_XCODE " ]
21- then
22- echo " Run Xcode if you need 'xed ./xcode/libgit2.xcodeproj'"
23- else
24- open " ./xcode/libgit2.xcodeproj"
16+ # And also add GIT_SSH and GIT_SSH_MEMORY_CREDENTIALS
17+ # We should add them via Package.swift, but let's do it after SPM adds plugin support.
18+ file=" $SCRIPT_DIRECTORY /include/git2/sys/features.h"
19+
20+ if ! grep -q " #define GIT_SSH_MEMORY_CREDENTIALS\b" " $file " ; then
21+ echo " #define GIT_SSH_MEMORY_CREDENTIALS 1" >> " $file "
22+ fi
23+
24+ if ! grep -q " #define GIT_SSH\b" " $file " ; then
25+ echo " #define GIT_SSH 1" >> " $file "
2526fi
You can’t perform that action at this time.
0 commit comments