-
Notifications
You must be signed in to change notification settings - Fork 4
/
copy_from_airsim.sh
executable file
·55 lines (47 loc) · 2.47 KB
/
copy_from_airsim.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
53
54
55
#!/bin/bash
if [[ -z "${AIRSIMPATH}" ]]; then
echo ""
echo "AIRSIMPATH not set."
echo "Please set AIRSIMPATH environment variable to the directory where AirSim is located on your system before running this script."
echo ""
exit 1
fi
set -e
# this will print stuff if there are any uncommitted changes in the working tree
changes="$(git status --porcelain=v1 2>/dev/null)"
if [[ -n "$changes" ]] && [[ $changes != " M copy_from_airsim.sh" ]]; then
echo ""
echo "Please commit or stash your changes in 'vtol-AirSim' before running this script!"
echo ""
echo " That way you can easily see what changed if anything goes wrong."
echo ""
echo ""
exit 1
else
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
set -x
# Sync changes to AirLib source files
rsync -a --delete "$AIRSIMPATH"/AirLib/include Source/AirLib
rsync -a --delete "$AIRSIMPATH"/AirLib/src Source/AirLib
# Sync changes to AirSim plugin source files
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/*.h ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/*.cpp ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/Recording ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/SimHUD ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/SimJoyStick ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/SimMode ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/UnrealSensors ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/Vehicles ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Source/Weather ./Source
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/AirSim.uplugin ./
# Sync changes to assets
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/Blueprints ./Content
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/HUDAssets ./Content
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/Models ./Content
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/StarterContent ./Content
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/VehicleAdv ./Content
rsync -a --delete "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/Weather ./Content
set +x
popd >/dev/null
fi