Skip to content

Commit a0b5110

Browse files
committed
Refactor install script output formatting to print status messages on new lines
- in `install.sh` could cloning, building, installig be non-verbose single liners, without all this command outputs? ├── .github │ └── workflows │ ├── deploy-vscode-extension.yml │ └── github-release.yml ├── README.md ├── apps │ └── editor │ └── package.json └── install.sh
1 parent b495613 commit a0b5110

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

‎install.sh‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,18 @@ fi
6565

6666
TMP_DIR=$(mktemp -d)
6767
trap 'rm -rf "$TMP_DIR"' EXIT
68-
echo -n "Cloning repository into temporary directory ($TMP_DIR)... "
68+
echo ""
69+
echo "Cloning repository into temporary directory ($TMP_DIR)..."
6970
git clone -q --depth 1 https://github.com/robertpiosik/CodeWebChat.git "$TMP_DIR"
70-
echo "Done"
7171
cd "$TMP_DIR"
7272
REPO_DIR="$TMP_DIR"
7373

74-
echo -n "Installing workspace dependencies... "
74+
echo "Installing workspace dependencies..."
7575
pnpm install > /dev/null 2>&1
76-
echo "Done"
7776

78-
echo -n "Building VS Code extension... "
77+
echo "Building VS Code extension..."
7978
cd apps/editor
8079
pnpm run build > /dev/null 2>&1
81-
echo "Done"
8280

8381
VSIX_FILE=$(ls *.vsix | head -n 1)
8482

@@ -87,17 +85,15 @@ if [ -z "$VSIX_FILE" ]; then
8785
exit 1
8886
fi
8987

90-
echo ""
9188
echo "Build successful: $VSIX_FILE"
9289
echo ""
9390

9491
install_to_editor() {
9592
local idx=$1
9693
local editor_name="${AVAILABLE_EDITORS[$idx]}"
9794
local editor_cmd="${EDITOR_CMDS[$idx]}"
98-
echo -n "Installing to $editor_name... "
95+
echo "Installing to $editor_name..."
9996
$editor_cmd --install-extension "$VSIX_FILE" --force > /dev/null 2>&1
100-
echo "Done"
10197
}
10298

10399
if [[ "$choice" == "a" || "$choice" == "A" ]]; then

0 commit comments

Comments
 (0)