forked from start-jsk/rtmros_common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_upstream.sh
executable file
·81 lines (69 loc) · 2.13 KB
/
setup_upstream.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
function usage {
echo >&2 "usage: $0"
echo >&2 " [-w|--workspace] workspace to set openrtm/openhrp/hrpsys repository,"
echo >&2 " [-p|--package] download only selected package,"
exit 0
}
function error {
usage
exit 1
}
trap error ERR
# command line parse
OPT=`getopt -o hw:p: -l help,workspace:,package: -- $*`
if [ $? != 0 ]; then
usage
fi
eval set -- $OPT
while [ -n "$1" ] ; do
case $1 in
-h|--help) usage ;;
-w|--workspace) WORKSPACE=$2; shift 2;;
-p|--package) PACKAGE=$2; shift 2;;
--) shift; break;;
*) echo "Unknown option($1)"; usage;;
esac
done
if [ ! -e $WORKSPACE/src/.rosinstall ]; then
echo "Your workspace is not initialized yet, please run
mkdir -p $WORKSPACE/src; wstool init $WORKSPACE/src
"
exit 1
fi
if [ "$CI" != "true" ] ; then
for pkg in rtshell rtctree rtsprofile openrtm_aist openrtm_aist_python; do
cat <<EOF >> /tmp/rosinstall.$$
- git:
uri: http://github.com/tork-a/$pkg-release
local-name: $pkg
EOF
done
fi
if [ "$IS_EUSLISP_TRAVIS_TEST" != "true" ] ; then
# wstool remove openhrp3
# update HISTORY-{en,ja}.txt, CMakeLists.txt(OPENHRP_VERSION) and ask kanehiro-san for set tag
cat <<EOF >> /tmp/rosinstall.$$
- git:
uri: http://github.com/fkanehiro/openhrp3
local-name: openhrp3
EOF
fi
# update package.xml, CMakeLists.txt(CMAKE_PACKAGE_VERSION) and ask kanehiro-san for set tag
cat <<EOF >> /tmp/rosinstall.$$
- git:
uri: http://github.com/fkanehiro/hrpsys-base
local-name: hrpsys
EOF
wstool merge /tmp/rosinstall.$$ -t $WORKSPACE/src
wstool info -t $WORKSPACE/src
wstool update --abort-changed-uris -t $WORKSPACE/src $PACKAGE
if [ -e $WORKSPACE/src/openhrp3/CMakeLists.txt ]; then
echo "Updaging openhrp3 CMakeLists.txt"
sed -i 's@option(ENABLE_DOXYGEN "Use Doxygen" ON)@option(ENABLE_DOXYGEN "Use Doxygen" OFF)@' $WORKSPACE/src/openhrp3/CMakeLists.txt
fi
if [ -e $WORKSPACE/src/hrpsys/CMakeLists.txt ]; then
echo "Updaging hrpsys CMakeLists.txt"
sed -i 's@option(ENABLE_DOXYGEN "Use Doxygen" ON)@option(ENABLE_DOXYGEN "Use Doxygen" OFF)@' $WORKSPACE/src/hrpsys/CMakeLists.txt
fi
echo "*** Done"