-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsync_to_airsim_repo.sh
executable file
·45 lines (36 loc) · 1.53 KB
/
sync_to_airsim_repo.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
#!/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
set -x
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
# Sync changes to AirLib source files
rsync -a --delete Source/AirLib/include "$AIRSIMPATH"/AirLib
rsync -a --delete Source/AirLib/src "$AIRSIMPATH"/AirLib
# Sync changes to AirSim plugin
plugin_source="$AIRSIMPATH"/Unreal/Plugins/AirSim/Source
# These are listed explicitly to avoid copying Source/AirLib to AirSim/Unreal/Plugins/AirSim/Source
rsync -a --delete Source/*.h "$plugin_source"
rsync -a --delete Source/*.cpp "$plugin_source"
rsync -a --delete Source/Recording "$plugin_source"
rsync -a --delete Source/SimHUD "$plugin_source"
rsync -a --delete Source/SimJoyStick "$plugin_source"
rsync -a --delete Source/SimMode "$plugin_source"
rsync -a --delete Source/UnrealSensors "$plugin_source"
rsync -a --delete Source/Vehicles "$plugin_source"
rsync -a --delete Source/Weather "$plugin_source"
# Sync changes to VTOL assets
old_dir="$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/Tiltrotor
new_dir="$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/VTOL
if [[ -d "$old_dir" ]]; then
mkdir "$new_dir"
mv "$old_dir" "$new_dir"
fi
rsync -a --delete Content/VTOL/Tiltrotor "$AIRSIMPATH"/Unreal/Plugins/AirSim/Content/VTOL
popd >/dev/null