From 30b0ac1fc3106d96c85139a0f7d6b95910b98fbe Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 1 Mar 2026 21:47:15 -0800 Subject: [PATCH] Replace stats with metrics, improve version detection --- scripts/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 3c3cebd..2e055bd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -58,18 +58,19 @@ mkdir -p ~/data mkdir -p ~/apps echo ">> Installing bundled apps" -BUNDLED_APPS="clock code cron env stats versions" +BUNDLED_APPS="clock code cron env metrics versions" for app in $BUNDLED_APPS; do if [ -d "apps/$app" ]; then echo " Installing $app..." # Copy app to ~/apps cp -r "apps/$app" ~/apps/ # Find the version directory and create current symlink - version_dir=$(ls -1 ~/apps/$app | grep -E '^[0-9]{8}-[0-9]{6}$' | sort -r | head -1) + version_dir=$(ls -1 ~/apps/$app | grep -E '^[0-9]{8}-[0-9]{6}$' | sort -r | head -1 || true) if [ -n "$version_dir" ]; then ln -sfn "$version_dir" ~/apps/$app/current - # Install dependencies (cd ~/apps/$app/current && bun install --frozen-lockfile) > /dev/null 2>&1 + elif [ -f ~/apps/$app/package.json ]; then + (cd ~/apps/$app && bun install --frozen-lockfile) > /dev/null 2>&1 fi fi done