Skip to content

Instantly share code, notes, and snippets.

@rafaneri
Created September 23, 2016 17:27
Show Gist options
  • Save rafaneri/cfd6bc33ea43b20897244e19dcf77f46 to your computer and use it in GitHub Desktop.
Save rafaneri/cfd6bc33ea43b20897244e19dcf77f46 to your computer and use it in GitHub Desktop.
Shell Script to create ROS packages.
#!/usr/bin/env sh
SOURCE_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
cd $SOURCE_DIR
cd ../..
SOURCE_DIR=$(cd "`dirname "$1"`" > /dev/null && pwd)
echo "********************************"
echo " CREATE CATKIN_PACKAGE "
echo "********************************"
echo "Enter the package name:"
read package_name
echo "Default package roscpp. Add other packages to your package:"
read custom_packages
echo "********************************"
echo " PARAMETERS "
echo "********************************"
echo "SOURCE_DIR: $SOURCE_DIR"
echo "Package name: $package_name"
echo "Custom packages: $custom_packages"
cd $SOURCE_DIR
catkin_create_pkg $package_name roscpp $custom_packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment