Skip to content

Commit 7c5fe7f

Browse files
author
Thomas G.
committed
fix: 🐛 correct crlf
1 parent 5e495af commit 7c5fe7f

3 files changed

Lines changed: 63 additions & 63 deletions

File tree

src/common-utils/_configure-feature.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help
1212
)
1313

1414
if [ -z "$feature" ]; then
15-
echo "Usage: configure-feature <feature>"
15+
echo "Usage: configure-feature <feature>\r"
1616
exit 1
1717
fi
1818

@@ -22,16 +22,16 @@ export source=${source:-/usr/local/share/$feature}
2222
# Get the indent size from devcontainer.json with jq, default to 2 if not found
2323
export tabSize=4
2424

25-
echo "Configuring feature <${Purple}$feature${None}>"
26-
echo "from <$source>"
25+
echo -e "Configuring feature <${Purple}$feature${None}>\r"
26+
echo -e "from <$source>\r"
2727

2828
# Go to the module root
2929
cd "$(git rev-parse --show-toplevel)" >/dev/null
3030

3131
# Deploy stubs if existing
3232
if [ -d $source/stubs ]; then
3333

34-
echo "${Blue}Deploy stubs${None}"
34+
echo -e "${Blue}Deploy stubs${None}\r"
3535

3636
find $source/stubs -type f -name ".*" -o -type f | while read file; do
3737

@@ -50,14 +50,14 @@ if [ -d $source/stubs ]; then
5050
# Remove # occurrences in the file path
5151
dest=$(echo $dest | sed 's/\/\#/\//g')
5252

53-
echo "Add '$dest' to .gitignore"
53+
echo -e "Add '$dest' to .gitignore\r"
5454

5555
# Add to .gitignore if not already there
5656
grep -qxF $dest .gitignore || echo "$dest" >>.gitignore
5757
fi
5858

5959
# Merge the file
60-
echo "${Yellow}Merging '$dest'...${None}"
60+
echo -e "${Yellow}Merging '$dest'...${None}\r"
6161
git merge-file -p -L current -L base -L stubs $dest /dev/null $file >$dest
6262

6363
# Apply the same permissions as the original file
@@ -67,7 +67,7 @@ if [ -d $source/stubs ]; then
6767
fi
6868

6969
# Log the merging process
70-
echo "${Blue}Merge all package folder json files into top level xxx.json${None}"
70+
echo -e "${Blue}Merge all package folder json files into top level xxx.json${None}\r"
7171

7272
for package in package composer; do
7373

@@ -77,19 +77,19 @@ for package in package composer; do
7777
echo "{}" >$package.json
7878
else
7979
# Pre-sort the existing package.json
80-
echo "${Yellow}Pre-merge normalize $package.json${None}"
80+
echo -e "${Yellow}Pre-merge normalize $package.json${None}\r"
8181
normalize-json -s -a -i -t ${tabSize:-4} $package.json
8282
fi
8383

8484
# Merge all package folder json files into the top-level package.json
8585
find $source -maxdepth 1 -name _*.$package.json | sort | while read file; do
86-
echo "${Yellow}Merge $file in $package.json${None}"
86+
echo -e "${Yellow}Merge $file in $package.json${None}\r"
8787
jq --indent ${tabSize:-4} -s '.[0] * .[1]' $file $package.json >/tmp/$package.json && mv -f /tmp/$package.json $package.json
8888
done
8989

9090
done
9191

9292
# Call all configure-xxx.sh scripts
9393
find $source -maxdepth 1 -name configure-*.sh | sort | while read file; do
94-
echo "${Yellow}Run $file${None}"
94+
echo -e "${Yellow}Run $file${None}\r"
9595
done

0 commit comments

Comments
 (0)