Skip to content

Commit e808676

Browse files
committed
Avoid symbolic links as they cause more trouble than they are worth
1 parent 6ea8e8f commit e808676

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

commands/init

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,6 @@ create-parent-dir() {
6868
if [[ "$FILE" =~ / ]]; then mkdir -p "${FILE%/*}"; fi
6969
}
7070

71-
add-link() {
72-
local FILE="$1"
73-
local LINK="$2"
74-
if [ ! -e "$LINK" ]; then
75-
create-parent-dir "$LINK"
76-
ln -fs "$FILE" "$LINK"
77-
git add "$LINK"
78-
fi
79-
}
80-
81-
add-link .cppsm/.clang-format .clang-format
82-
add-link .cppsm/.gitignore .gitignore
83-
add-link .cppsm/.prettierrc .prettierrc
84-
8571
add-file() {
8672
local FILE="$1"
8773
if [ ! -e "$FILE" ]; then
@@ -91,6 +77,27 @@ add-file() {
9177
fi
9278
}
9379

80+
add-file .clang-format << EOF
81+
BinPackArguments: false
82+
BinPackParameters: false
83+
ColumnLimit: 80
84+
IndentWidth: 2
85+
EOF
86+
87+
add-file .gitignore << EOF
88+
.build*
89+
EOF
90+
91+
add-file .prettierrc << EOF
92+
{
93+
"bracketSpacing": false,
94+
"printWidth": 80,
95+
"semi": false,
96+
"singleQuote": true,
97+
"proseWrap": "always"
98+
}
99+
EOF
100+
94101
add-file CMakeLists.txt << EOF
95102
cmake_minimum_required(VERSION 3.10)
96103
project($NAME)

0 commit comments

Comments
 (0)