Skip to content

Commit b495613

Browse files
committed
Clean up install script output by suppressing verbose logs and adding status indicators
- in `install.sh` could cloning, building, installig be non-verbose single liners? ├── .github │ └── workflows │ ├── deploy-vscode-extension.yml │ └── github-release.yml ├── README.md ├── apps │ └── editor │ └── package.json └── install.sh
1 parent 985b745 commit b495613

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

‎install.sh‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ fi
6565

6666
TMP_DIR=$(mktemp -d)
6767
trap 'rm -rf "$TMP_DIR"' EXIT
68-
echo ""
69-
echo "Cloning repository into temporary directory ($TMP_DIR)..."
70-
git clone --depth 1 https://github.com/robertpiosik/CodeWebChat.git "$TMP_DIR"
68+
echo -n "Cloning repository into temporary directory ($TMP_DIR)... "
69+
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 ""
75-
echo "Installing workspace dependencies..."
76-
pnpm install
74+
echo -n "Installing workspace dependencies... "
75+
pnpm install > /dev/null 2>&1
76+
echo "Done"
7777

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

8383
VSIX_FILE=$(ls *.vsix | head -n 1)
8484

@@ -87,15 +87,17 @@ if [ -z "$VSIX_FILE" ]; then
8787
exit 1
8888
fi
8989

90+
echo ""
9091
echo "Build successful: $VSIX_FILE"
9192
echo ""
9293

9394
install_to_editor() {
9495
local idx=$1
9596
local editor_name="${AVAILABLE_EDITORS[$idx]}"
9697
local editor_cmd="${EDITOR_CMDS[$idx]}"
97-
echo "Installing to $editor_name..."
98-
$editor_cmd --install-extension "$VSIX_FILE" --force
98+
echo -n "Installing to $editor_name... "
99+
$editor_cmd --install-extension "$VSIX_FILE" --force > /dev/null 2>&1
100+
echo "Done"
99101
}
100102

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

0 commit comments

Comments
 (0)