Skip to content

Commit 2f8e039

Browse files
committed
Avoiding long lines
1 parent e83db2c commit 2f8e039

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

commands/init

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
. "${BASH_SOURCE%/*}/.settings"
55

66
to-cpp() {
7-
echo "$1" | sed -e 's#[^a-zA-Z0-9_]#_#g' -e 's#__*#_#g' -e 's#^_##' -e 's#_$##'
7+
echo "$1" \
8+
| sed -e 's#[^a-zA-Z0-9_]#_#g' \
9+
-e 's#__*#_#g' \
10+
-e 's#^_##' \
11+
-e 's#_$##'
812
}
913

1014
if [ -z "$NAME" ]; then
@@ -55,12 +59,14 @@ fi
5559
BOILERPLATE_URL="https://github.com/cppsm/cppsm-boilerplate.git"
5660

5761
if [ ! -d .cppsm ]; then
58-
if git ls-remote --heads "$BOILERPLATE_URL" | grep -q "\brefs/heads/$CLI_BRANCH\$"; then
62+
if git ls-remote --heads "$BOILERPLATE_URL" \
63+
| grep -q "\brefs/heads/$CLI_BRANCH\$"; then
5964
BOILERPLATE_BRANCH="$CLI_BRANCH"
6065
else
6166
BOILERPLATE_BRANCH="master"
6267
fi
63-
git submodule "${GIT_QUIET[@]}" add --branch "$BOILERPLATE_BRANCH" "$BOILERPLATE_URL" .cppsm
68+
git submodule "${GIT_QUIET[@]}" add --branch "$BOILERPLATE_BRANCH" \
69+
"$BOILERPLATE_URL" .cppsm
6470
fi
6571

6672
create-parent-dir() {

0 commit comments

Comments
 (0)