From 553db15f58304ec3f5bdf73af376b6aa920f7cc1 Mon Sep 17 00:00:00 2001 From: Nicholas Lawrance Date: Mon, 11 Apr 2016 11:05:51 -0700 Subject: [PATCH] Corrected file extensions in rosrepubs-gen --- rosrepub-gen.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rosrepub-gen.sh b/rosrepub-gen.sh index f329bbb..e04a7bf 100755 --- a/rosrepub-gen.sh +++ b/rosrepub-gen.sh @@ -42,8 +42,10 @@ fi mkdir -p launch autosrc touch -a autosrc/CMakeLists.txt -# Create (empty) launch file -LAUNCH_FILE="launch/$( echo $1 | cut -f1 -d "." ).launch" +# Create (empty) launch file +LAUNCH_FILE=${1##*/} # Remove leading directories +LAUNCH_FILE=${LAUNCH_FILE%.*} # Remove trailing extension +LAUNCH_FILE="launch/${LAUNCH_FILE}.launch" echo "Adding publishers to launch file: ${LAUNCH_FILE} (will be overwritten)" >&2 # if [ ! -f $LAUNCH_FILE ] ; then echo "" > $LAUNCH_FILE