Skip to content

Instantly share code, notes, and snippets.

@vooon
Created June 26, 2014 15:27
Show Gist options
  • Save vooon/e6d19a0d8ff228f07870 to your computer and use it in GitHub Desktop.
Save vooon/e6d19a0d8ff228f07870 to your computer and use it in GitHub Desktop.
#!/bin/bash
ROSDISTRO=indigo
ROSINSTALL=/opt/ros/$ROSDISTRO
ROSUPFILE=/tmp/rosup.yaml
export-armhf-arch() {
export DISTCC_HOSTS='robert'
export ARCH=arm
export CC='distcc arm-linux-gnueabihf-gcc'
export CXX='distcc arm-linux-gnueabihf-g++'
}
rosdep-check-install() {
rosdep install --from-paths src --ignore-src --rosdistro $ROSDISTRO -y
}
catkin-build-install() {
time ./src/catkin/bin/catkin_make_isolated --install-space $ROSINSTALL --install -DCMAKE_BUILD_TYPE=Release $@
}
rosws-update-all() {
rosinstall_generator --rosdistro $ROSDISTRO \
$(wstool info --data-only --only=localname -t src|tr '\n' ' ') | tee $ROSUPFILE
}
rosws-add-deps() {
rosinstall_generator --rosdistro $ROSDISTRO --wet-only --deps $@ | tee $ROSUPFILE
}
bloom-import-patch() {
local from_distro=$1
local to_distro=$2
local package=$3
if [ "x$package" = "x" -o "x$from_distro" = "x" -o "x$to_distro" = "x" ]; then
echo "Unset one of params: <from> <to> <package>"
exit 1
fi
# http://wiki.ros.org/bloom/Tutorials/ReleaseThirdParty#Porting_patches_from_one_rosdistro_to_another
git checkout patches/release/$to_distro/$package
git ls-tree --name-only -r patches/release/$from_distro/$package | \
grep '\.patch' | xargs -I {} sh -c "git show patches/release/$from_distro/$package:\"\$1\" > \"\$1\"" -- {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment