-
Notifications
You must be signed in to change notification settings - Fork 32
/
Setup.sh
executable file
·52 lines (43 loc) · 1.66 KB
/
Setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
47
48
49
50
51
52
#!/bin/bash
# Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
set -e
cd "`dirname "$0"`"
if [ ! -f Engine/Binaries/DotNET/GitDependencies.exe ]; then
echo "GitSetup ERROR: This script does not appear to be located \
in the root UE4 directory and must be run from there."
exit 1
fi
if [ "$(uname)" = "Darwin" ]; then
# Setup the git hooks
if [ -d .git/hooks ]; then
echo "Registering git hooks... (this will override existing ones!)"
rm -f .git/hooks/post-checkout
rm -f .git/hooks/post-merge
ln -s ../../Engine/Build/BatchFiles/Mac/GitDependenciesHook.sh .git/hooks/post-checkout
ln -s ../../Engine/Build/BatchFiles/Mac/GitDependenciesHook.sh .git/hooks/post-merge
fi
# Get the dependencies for the first time
Engine/Build/BatchFiles/Mac/GitDependencies.sh --prompt $@
else
# Setup the git hooks
if [ -d .git/hooks ]; then
echo "Registering git hooks... (this will override existing ones!)"
echo \#!/bin/sh >.git/hooks/post-checkout
echo Engine/Build/BatchFiles/Linux/GitDependencies.sh >>.git/hooks/post-checkout
chmod +x .git/hooks/post-checkout
echo \#!/bin/sh >.git/hooks/post-merge
echo Engine/Build/BatchFiles/Linux/GitDependencies.sh >>.git/hooks/post-merge
chmod +x .git/hooks/post-merge
fi
# Get the dependencies for the first time
Engine/Build/BatchFiles/Linux/GitDependencies.sh --prompt $@
echo Register the engine installation...
if [ -f Engine/Binaries/Linux/UnrealVersionSelector-Linux-Shipping ]; then
pushd Engine/Binaries/Linux > /dev/null
./UnrealVersionSelector-Linux-Shipping -register > /dev/null &
popd > /dev/null
fi
pushd Engine/Build/BatchFiles/Linux > /dev/null
./Setup.sh "$@"
popd > /dev/null
fi