Skip to content

Commit

Permalink
Minor changes:
Browse files Browse the repository at this point in the history
use the env for finding the shell
added comments for ease-of-use of script
  • Loading branch information
kunaltyagi committed Jul 6, 2019
1 parent 682239f commit e72a561
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .dev/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#! /usr/bin/sh
#! /usr/bin/env sh

# sample command line usage: $0 clang-format(version >= 6.0) $PCL_SOURCE_DIR
# $ sh ./.dev/format.sh `which clang-format` ./
# $ sh format.sh `which clang-format` ../
# $ sh ~/pcl/format.sh `which clang-format` ~/pcl
# $ sh /pcl/format.sh `which clang-format` /pcl

format() {
# don't use a directory with whitespace
Expand All @@ -13,7 +19,7 @@ format() {
fi

# check for self
if [ ! -f "${PCL_DIR}/dev/format.sh" ]; then
if [ ! -f "${PCL_DIR}/.dev/format.sh" ]; then
echo "Please ensure that PCL_SOURCE_DIR is passed as the second argument"
exit 166
fi
Expand Down

0 comments on commit e72a561

Please sign in to comment.